【发布时间】:2010-01-26 13:49:40
【问题描述】:
我正在关注 Rob Conery MVC Storefront 教程系列,我从以下构造函数 public 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)”
【问题讨论】:
标签: c# datacontext