本文整理汇总了C#中IDbSet类的典型用法代码示例。如果您正苦于以下问题:C# IDbSet类的具体用法?C# IDbSet怎么用?C# IDbSet使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
IDbSet类属于命名空间,在下文中一共展示了IDbSet类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetUp
public void SetUp()
{
_dbContext = Substitute.For<EfDbContext>();
_toDoDbSet = Substitute.For<IDbSet<ToDoDto>>();
_dbContext.ToDos = _toDoDbSet;
_repository = new ToDoDtoRepository(_dbContext);
}
示例2: ContestScore
public ContestScore(Contest contest, IDbSet<Participant> participantList)
{
_contest = contest;
ContestName = contest.Name;
ParticipantList = participantList;
AddParticipantScores();
}
示例3: FindExecutedRevisions
private IEnumerable<IDataUpHandler> FindExecutedRevisions(IDbSet<Revision> systemRevisions, IEnumerable<IDataUpHandler> allRevisions)
{
return from dataRevision in allRevisions
let revisionType = dataRevision.GetType().FullName
where systemRevisions.Any(x => revisionType.Equals(x.Type, StringComparison.InvariantCultureIgnoreCase))
select dataRevision;
}
示例4: SqlServerStateProvider
public SqlServerStateProvider(string nameOrConnectionStr)
{
DbContext = new SequenceDbContext(nameOrConnectionStr);
DbSet = DbContext.Set<SqlServerSequence>();
}
示例5: SportService
public SportService(IDbContext dbContext)
{
_dbContext = dbContext;
_sports = dbContext.Set<Sport>();
_sportCategories = dbContext.Set<SportCategory>();
_sportDetails = dbContext.Set<SportDetail>();
}
示例6: IeltsMaterialService
public IeltsMaterialService(IUnitOfWork uow, Lazy<INotificationService> notificationService, Lazy<IFilesProxyAdapter> filesProxyAdapter)
{
_uow = uow;
_IeltsMaterial = uow.Set<IeltsMaterial>();
_notificationService = notificationService;
_filesProxyAdapter = filesProxyAdapter;
}
示例7: ResearchExperienceService
public ResearchExperienceService(IUnitOfWork unitOfWork, IApplicationUserManager userManager, IMappingEngine mappingEngine)
{
_userManager = userManager;
_unitOfWork = unitOfWork;
_researchExperiences = _unitOfWork.Set<ResearchExperience>();
_mappingEngine = mappingEngine;
}
示例8: LogRepository
public LogRepository(DbContext context)
{
if (context == null) throw new ArgumentNullException("context");
_context = context;
_logEntity = _context.Set<Log>();
}
示例9: SessionRequestService
public SessionRequestService(IUnitOfWork uow, Lazy<INotificationService> notificationService, ISessionService sessionService)
{
_sessionService = sessionService;
_notificationService = notificationService;
_uow = uow;
_sessionRequest = uow.Set<SessionRequest>();
}
示例10: UserRolesTableRepository
/// <summary>
/// Constructor that takes a MySQLDatabase instance
/// </summary>
/// <param name="database"></param>
public UserRolesTableRepository(MySQLDatabase database)
{
_database = database;
//_database.Set(typeof(UserRolesTable));
this.dbSet = database.Set<UserRolesTable>();
this.dbSetRoles = database.Set<IdentityRole>();
}
示例11: ApplicationEventRepository
public ApplicationEventRepository(DbContext context)
{
if (context == null) throw new ArgumentNullException("context");
_context = context;
_logEventEntity = _context.Set<ApplicationEvent>();
}
示例12: TitleService
public TitleService(IUnitOfWork unitOfWork, IApplicationUserManager userManager, IMappingEngine mappingEngine)
{
_userManager = userManager;
_unitOfWork = unitOfWork;
_titles = _unitOfWork.Set<Title>();
_mappingEngine = mappingEngine;
}
示例13: NotificationSettingService
public NotificationSettingService(IUnitOfWork uow, IUserService userService, IMessagingGatewayAdapter messagingGateway)
{
_uow = uow;
_notification = uow.Set<NotificationSetting>();
_userService = userService;
_messagingGateway = messagingGateway;
}
示例14: FakeNorthwindDbContext
public FakeNorthwindDbContext()
{
AlphabeticalListOfProducts = new FakeDbSet<AlphabeticalListOfProduct>();
Categories = new FakeDbSet<Category>();
CategorySalesFor1997 = new FakeDbSet<CategorySalesFor1997>();
CurrentProductLists = new FakeDbSet<CurrentProductList>();
Customers = new FakeDbSet<Customer>();
CustomerAndSuppliersByCities = new FakeDbSet<CustomerAndSuppliersByCity>();
CustomerDemographics = new FakeDbSet<CustomerDemographic>();
Employees = new FakeDbSet<Employee>();
Invoices = new FakeDbSet<Invoice>();
Orders = new FakeDbSet<Order>();
OrderDetails = new FakeDbSet<OrderDetail>();
OrderDetailsExtendeds = new FakeDbSet<OrderDetailsExtended>();
OrdersQries = new FakeDbSet<OrdersQry>();
OrderSubtotals = new FakeDbSet<OrderSubtotal>();
Products = new FakeDbSet<Product>();
ProductsAboveAveragePrices = new FakeDbSet<ProductsAboveAveragePrice>();
ProductSalesFor1997 = new FakeDbSet<ProductSalesFor1997>();
ProductsByCategories = new FakeDbSet<ProductsByCategory>();
Regions = new FakeDbSet<Region>();
SalesByCategories = new FakeDbSet<SalesByCategory>();
SalesTotalsByAmounts = new FakeDbSet<SalesTotalsByAmount>();
Shippers = new FakeDbSet<Shipper>();
SummaryOfSalesByQuarters = new FakeDbSet<SummaryOfSalesByQuarter>();
SummaryOfSalesByYears = new FakeDbSet<SummaryOfSalesByYear>();
Suppliers = new FakeDbSet<Supplier>();
Sysdiagrams = new FakeDbSet<Sysdiagram>();
Territories = new FakeDbSet<Territory>();
}
示例15: InterviewService
public InterviewService(IUnitOfWork unitOfWork, IApplicationUserManager userManager, IMappingEngine mappingEngine)
{
_userManager = userManager;
_unitOfWork = unitOfWork;
_interviews = _unitOfWork.Set<Interview>();
_mappingEngine = mappingEngine;
}