这有什么问题?:
public abstract class EFNLBaseRepository:IDisposable
{
NLSubscriberDBContext _dbContext;
protected internal NLSubscriberDBContext dbContext
{
get
{...}
}
...
}
internal class NLSubscriberDBContext : DbContext
{
...
}
当然,这两个类都在同一个程序集中。这是我得到的编译错误:
错误 1 可访问性不一致:属性类型 'NLSubscriber.Core.Service.Repository.EFDAL.NLSubscriberDBContext' 比属性 'NLSubscriber.Core.Service.Repository.EFDAL.EFNLBaseRepository.dbContext' C:\Data\Projects\Neticon\TFS 更难访问\NLSubscriber - Newsletter\NLSubscriber-newsletter\NLSubscriber.Core\Service\Repository\EFDAL\EFNLBaseRepository.cs 12 50 NLSubscriber.Core