本文整理汇总了C#中IDbSet类的典型用法代码示例。如果您正苦于以下问题:C# IDbSet类的具体用法?C# IDbSet怎么用?C# IDbSet使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IDbSet类属于命名空间,在下文中一共展示了IDbSet类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: EntireEvaluationService
public EntireEvaluationService(IUnitOfWork unitOfWork, IApplicationUserManager userManager, IMappingEngine mappingEngine)
{
_userManager = userManager;
_unitOfWork = unitOfWork;
_entireEvaluations = _unitOfWork.Set<EntireEvaluation>();
_mappingEngine = mappingEngine;
}
开发者ID:rabbal,项目名称:Decision,代码行数:7,代码来源:EnitreEvaluationService.cs
示例17: ReferentialTeacherService
public ReferentialTeacherService(IUnitOfWork unitOfWork, IApplicationUserManager userManager, IMappingEngine mappingEngine)
{
_userManager = userManager;
_unitOfWork = unitOfWork;
_referentialTeachers = _unitOfWork.Set<ReferentialTeacher>();
_mappingEngine = mappingEngine;
}
开发者ID:raminmjj,项目名称:Decision,代码行数:7,代码来源:ReferentialJudgeService.cs
示例18: FakeCMSDbContext
public FakeCMSDbContext()
{
AuthTokens = new FakeDbSet<AuthToken>();
Barcodes = new FakeDbSet<Barcode>();
Catalogues = new FakeDbSet<Catalogue>();
Clients = new FakeDbSet<Client>();
ClientAllowScopes = new FakeDbSet<ClientAllowScope>();
ItemAttributes = new FakeDbSet<ItemAttribute>();
ItemMasters = new FakeDbSet<ItemMaster>();
Members = new FakeDbSet<Member>();
MemberInRoles = new FakeDbSet<MemberInRole>();
MemberSpecificScopes = new FakeDbSet<MemberSpecificScope>();
Merchandises = new FakeDbSet<Merchandise>();
Products = new FakeDbSet<Product>();
ProductPictures = new FakeDbSet<ProductPicture>();
Promotions = new FakeDbSet<Promotion>();
PurchasePrices = new FakeDbSet<PurchasePrice>();
Restructures = new FakeDbSet<Restructure>();
Roles = new FakeDbSet<Role>();
RoleInScopes = new FakeDbSet<RoleInScope>();
Scopes = new FakeDbSet<Scope>();
SubCodes = new FakeDbSet<SubCode>();
Suppliers = new FakeDbSet<Supplier>();
SupplierAttributes = new FakeDbSet<SupplierAttribute>();
Sysdiagrams = new FakeDbSet<Sysdiagram>();
}
开发者ID:cashwu,项目名称:testZip,代码行数:26,代码来源:FakeCMSDbContext.cs
示例19: AuditLogService
public AuditLogService(IUnitOfWork unitOfWork, IApplicationUserManager userManager, IMappingEngine mappingEngine)
{
_userManager = userManager;
_unitOfWork = unitOfWork;
_logs = _unitOfWork.Set<AuditLog>();
_mappingEngine = mappingEngine;
}
开发者ID:raminmjj,项目名称:Decision,代码行数:7,代码来源:AuditLogService.cs
示例20: AddSubReportForm
public AddSubReportForm(IUnitOfWork unitOfWork,
IShowListForCities showListForCities,IShowListForDrivers showListForDrivers, IShowListForFreights showListForFreights)
: base(unitOfWork)
{
_paths = unitOfWork.Set<Path>();
_drivers = unitOfWork.Set<Driver>();
_freights = unitOfWork.Set<Freight>();
_showListForCities = showListForCities;
_showListForDrivers = showListForDrivers;
_showListForFreights = showListForFreights;
InitializeComponent();
_defaultControl = pathCombo;
pathCombo.Items.Clear();
_pathList = _paths.Where(x => x.ActiveState).ToList();
foreach (var tmp in _pathList.Select(path => $"{path.SourceCity} - {path.DestinationCity} :[{path.Id}]"))
pathCombo.Items.Add(tmp);
driverCombo.Items.Clear();
_driverList = _drivers.Where(x => x.ActiveState).ToList();
foreach (var tmp in
_driverList.Select(driver => $"{driver.Name} {driver.Family} - {driver.Plaque} :[{driver.Id}]"))
driverCombo.Items.Add(tmp);
freightCombo.Items.Clear();
_freightList = _freights.Where(x => x.ActiveState).ToList();
foreach (var tmp in _freightList)
freightCombo.Items.Add($"{tmp.Name} :[{tmp.Id}]");
}
开发者ID:mortezaraeisi,项目名称:Basim,代码行数:30,代码来源:AddSubReportForm.cs
注:本文中的IDbSet类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论