我下面罗布科纳MVC店面教程系列,我从下面的构造公共SqlCatalogRepository(DB的DataContext)获得的可访问性不一致错误:可访问性不一致的问题
public class SqlCatalogRepository : ICatalogRepository
{
DB db;
public SqlCatalogRepository()
{
db = new DB();
//turn off change tracking
db.ObjectTrackingEnabled = false;
}
public SqlCatalogRepository(DB dataContext)
{
//override the current context
//with the one passed in
db = dataContext;
}
以下是错误消息: 错误1不一致辅助功能:参数类型“SqlRepository.DB”大于法“Data.SqlCatalogRepository.SqlCatalogRepository(SqlRepository.DB)”不太容易接近