mvcarchitecture
mvcarchitecture copied to clipboard
Error CS0122 'Disposable.Disposable()' is inaccessible due to its protection level
Hello, I got the follow error "Error CS0122 'Disposable.Disposable()' is inaccessible due to its protection level" when I tried to implement DbFactory class. Please see below for details. It's also happening the code project download. Please advise.
Thanks,
Mani
public class DbFactory : Disposable, IDbFactory { StoreEntities dbContext;
public StoreEntities Init()
{
return dbContext ?? (dbContext = new StoreEntities());
}
protected override void DisposeCore()
{
if(dbContext != null)
{
dbContext.Dispose();
}
}
}