basically I'm getting an exception while im performing this:
var userDb = new UserData();
userDb.InsertData(DbName);
My InsertData function:
var userRepo = new UserRepository();
var users = new List<User>();
using (var db = userRepo.InitialDb(dbName))
{
userRepo.AddList(_users);
users = userRepo.GetAll();
}
and while I'm running InsertData function, i get this exception:
{"Method not found: 'LiteDB.LiteDatabase Db.Data.Repository.Repository`1.InitialDb(System.String)'."}
My UserRepository.cs
public class UserRepository : Repository<User>{}
While my Repository.cs:
public abstract class Repository<T> where T : class
{
protected LiteDatabase db;
public LiteDatabase InitialDb(string dbPath)
{
db = new LiteDatabase(dbPath);
return db;
}
}
So the question here is,
1. I don't know if i inherited my parent well.
2. If yes, why there is a method not found exception thrown?
Thanks in advance, let me know if i missed out anything in the question.