当前位置: 首页>>代码示例>>C#>>正文


C# IDbSet类代码示例

本文整理汇总了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);
 }
开发者ID:kmckee,项目名称:onion,代码行数:7,代码来源:ToDoDtoRepositoryTests.cs

示例2: ContestScore

 public ContestScore(Contest contest, IDbSet<Participant> participantList)
 {
     _contest = contest;
     ContestName = contest.Name;
     ParticipantList = participantList;
     AddParticipantScores();
 }
开发者ID:prademak,项目名称:JavaProgrammingContest,代码行数:7,代码来源:ScoresController.cs

示例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;
 }
开发者ID:netvietdev,项目名称:DataUp,代码行数:7,代码来源:DefaultDataUpHandlerSearchWorker.cs

示例4: SqlServerStateProvider

        public SqlServerStateProvider(string nameOrConnectionStr)
        {
            DbContext = new SequenceDbContext(nameOrConnectionStr);

            DbSet = DbContext.Set<SqlServerSequence>();

        }
开发者ID:geffzhang,项目名称:Sequence,代码行数:7,代码来源:SqlServerStateProvider.cs

示例5: SportService

 public SportService(IDbContext dbContext)
 {
     _dbContext = dbContext;
     _sports = dbContext.Set<Sport>();
     _sportCategories = dbContext.Set<SportCategory>();
     _sportDetails = dbContext.Set<SportDetail>();
 }
开发者ID:raminmjj,项目名称:SportsSystem,代码行数:7,代码来源:SportService.cs

示例6: IeltsMaterialService

 public IeltsMaterialService(IUnitOfWork uow, Lazy<INotificationService> notificationService, Lazy<IFilesProxyAdapter> filesProxyAdapter)
 {
     _uow = uow;
     _IeltsMaterial = uow.Set<IeltsMaterial>();
     _notificationService = notificationService;
     _filesProxyAdapter = filesProxyAdapter;
 }
开发者ID:YekanPedia,项目名称:ManagementSystem,代码行数:7,代码来源:IeltsMaterialService.cs

示例7: ResearchExperienceService

 public ResearchExperienceService(IUnitOfWork unitOfWork, IApplicationUserManager userManager, IMappingEngine mappingEngine)
 {
     _userManager = userManager;
     _unitOfWork = unitOfWork;
     _researchExperiences = _unitOfWork.Set<ResearchExperience>();
     _mappingEngine = mappingEngine;
 }
开发者ID:raminmjj,项目名称:Decision,代码行数:7,代码来源:ResearchExperienceService.cs

示例8: LogRepository

        public LogRepository(DbContext context)
        {
            if (context == null) throw new ArgumentNullException("context");

            _context = context;
            _logEntity = _context.Set<Log>();
        }
开发者ID:vitorsalgado,项目名称:fatec-mobile,代码行数:7,代码来源:LogRepository.cs

示例9: SessionRequestService

 public SessionRequestService(IUnitOfWork uow, Lazy<INotificationService> notificationService, ISessionService sessionService)
 {
     _sessionService = sessionService;
     _notificationService = notificationService;
     _uow = uow;
     _sessionRequest = uow.Set<SessionRequest>();
 }
开发者ID:YekanPedia,项目名称:ManagementSystem,代码行数:7,代码来源:SessionRequestService.cs

示例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>();
 }
开发者ID:ali-raza-iftikhar,项目名称:MySqlMVCIdentity,代码行数:11,代码来源:UserRolesTableRepository.cs

示例11: ApplicationEventRepository

        public ApplicationEventRepository(DbContext context)
        {
            if (context == null) throw new ArgumentNullException("context");

            _context = context;
            _logEventEntity = _context.Set<ApplicationEvent>();
        }
开发者ID:vitorsalgado,项目名称:fatec-mobile,代码行数:7,代码来源:ApplicationEventRepository.cs

示例12: TitleService

 public TitleService(IUnitOfWork unitOfWork, IApplicationUserManager userManager, IMappingEngine mappingEngine)
 {
     _userManager = userManager;
     _unitOfWork = unitOfWork;
     _titles = _unitOfWork.Set<Title>();
     _mappingEngine = mappingEngine;
 }
开发者ID:raminmjj,项目名称:Decision,代码行数:7,代码来源:TitleService.cs

示例13: NotificationSettingService

 public NotificationSettingService(IUnitOfWork uow, IUserService userService, IMessagingGatewayAdapter messagingGateway)
 {
     _uow = uow;
     _notification = uow.Set<NotificationSetting>();
     _userService = userService;
     _messagingGateway = messagingGateway;
 }
开发者ID:YekanPedia,项目名称:ManagementSystem,代码行数:7,代码来源:NotificationSettingService.cs

示例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>();
 }
开发者ID:kimx,项目名称:Examples,代码行数:30,代码来源:FakeNorthwindDbContext.cs

示例15: InterviewService

 public InterviewService(IUnitOfWork unitOfWork, IApplicationUserManager userManager, IMappingEngine mappingEngine)
 {
     _userManager = userManager;
     _unitOfWork = unitOfWork;
     _interviews = _unitOfWork.Set<Interview>();
     _mappingEngine = mappingEngine;
 }
开发者ID:rabbal,项目名称:Decision,代码行数:7,代码来源:InterviewService.cs


注:本文中的IDbSet类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。