public SqlServerStateProvider(string nameOrConnectionStr) { DbContext = new SequenceDbContext(nameOrConnectionStr); DbSet = DbContext.Set<SqlServerSequence>(); }
public TitleService(IUnitOfWork unitOfWork, IApplicationUserManager userManager, IMappingEngine mappingEngine) { _userManager = userManager; _unitOfWork = unitOfWork; _titles = _unitOfWork.Set<Title>(); _mappingEngine = mappingEngine; }
public ResearchExperienceService(IUnitOfWork unitOfWork, IApplicationUserManager userManager, IMappingEngine mappingEngine) { _userManager = userManager; _unitOfWork = unitOfWork; _researchExperiences = _unitOfWork.Set<ResearchExperience>(); _mappingEngine = mappingEngine; }
public InterviewService(IUnitOfWork unitOfWork, IApplicationUserManager userManager, IMappingEngine mappingEngine) { _userManager = userManager; _unitOfWork = unitOfWork; _interviews = _unitOfWork.Set<Interview>(); _mappingEngine = mappingEngine; }
public SportService(IDbContext dbContext) { _dbContext = dbContext; _sports = dbContext.Set<Sport>(); _sportCategories = dbContext.Set<SportCategory>(); _sportDetails = dbContext.Set<SportDetail>(); }
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>(); }
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}]"); }
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; }
public ReferentialTeacherService(IUnitOfWork unitOfWork, IApplicationUserManager userManager, IMappingEngine mappingEngine) { _userManager = userManager; _unitOfWork = unitOfWork; _referentialTeachers = _unitOfWork.Set<ReferentialTeacher>(); _mappingEngine = mappingEngine; }
public NotificationSettingService(IUnitOfWork uow, IUserService userService, IMessagingGatewayAdapter messagingGateway) { _uow = uow; _notification = uow.Set<NotificationSetting>(); _userService = userService; _messagingGateway = messagingGateway; }
public void SetUp() { _dbContext = Substitute.For<EfDbContext>(); _toDoDbSet = Substitute.For<IDbSet<ToDoDto>>(); _dbContext.ToDos = _toDoDbSet; _repository = new ToDoDtoRepository(_dbContext); }
public ApplicationEventRepository(DbContext context) { if (context == null) throw new ArgumentNullException("context"); _context = context; _logEventEntity = _context.Set<ApplicationEvent>(); }
public EntireEvaluationService(IUnitOfWork unitOfWork, IApplicationUserManager userManager, IMappingEngine mappingEngine) { _userManager = userManager; _unitOfWork = unitOfWork; _entireEvaluations = _unitOfWork.Set<EntireEvaluation>(); _mappingEngine = mappingEngine; }
public AuditLogService(IUnitOfWork unitOfWork, IApplicationUserManager userManager, IMappingEngine mappingEngine) { _userManager = userManager; _unitOfWork = unitOfWork; _logs = _unitOfWork.Set<AuditLog>(); _mappingEngine = mappingEngine; }
public IeltsMaterialService(IUnitOfWork uow, Lazy<INotificationService> notificationService, Lazy<IFilesProxyAdapter> filesProxyAdapter) { _uow = uow; _IeltsMaterial = uow.Set<IeltsMaterial>(); _notificationService = notificationService; _filesProxyAdapter = filesProxyAdapter; }
public ContestScore(Contest contest, IDbSet<Participant> participantList) { _contest = contest; ContestName = contest.Name; ParticipantList = participantList; AddParticipantScores(); }
public SessionRequestService(IUnitOfWork uow, Lazy<INotificationService> notificationService, ISessionService sessionService) { _sessionService = sessionService; _notificationService = notificationService; _uow = uow; _sessionRequest = uow.Set<SessionRequest>(); }
public LogRepository(DbContext context) { if (context == null) throw new ArgumentNullException("context"); _context = context; _logEntity = _context.Set<Log>(); }
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>(); }
/// <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>(); }
public EducationalBackgroundService(IUnitOfWork unitOfWork, IApplicationUserManager userManager, IMappingEngine mappingEngine) { _userManager = userManager; _unitOfWork = unitOfWork; _educationalBackgrounds = _unitOfWork.Set<EducationalBackground>(); _mappingEngine = mappingEngine; }
public QuestionService(IUnitOfWork unitOfWork, IAnswerOptionService answerOptionService, IApplicationUserManager userManager, IMappingEngine mappingEngine) { _userManager = userManager; _unitOfWork = unitOfWork; _questions = _unitOfWork.Set<Question>(); _mappingEngine = mappingEngine; _answerOptionService = answerOptionService; }
public AnswerOptionService(IUnitOfWork unitOfWork, ITitleService titleService, IApplicationUserManager userManager, IMappingEngine mappingEngine) { _userManager = userManager; _unitOfWork = unitOfWork; _answerOptions = _unitOfWork.Set<AnswerOption>(); _titleService = titleService; _mappingEngine = mappingEngine; }
public todayReportForm(IUnitOfWork uinOfWork, IAddOrEditReport addForm, IShowListForSubReports viewSubReport) { _repositoryReports = uinOfWork.Set<Report>(); _addForm = addForm; _viewSubReport = viewSubReport; InitializeComponent(); }
protected SettingsBase(IUnitOfWork unitOfWork) { _settings = unitOfWork.Set<Setting>(); var type = GetType(); _name = type.Name; _properties = type.GetProperties(); }
public EducationalExperienceService(IUnitOfWork unitOfWork, ITitleService titleService, IApplicationUserManager userManager, IMappingEngine mappingEngine) { _titleService = titleService; _userManager = userManager; _unitOfWork = unitOfWork; _educationalExperiences = _unitOfWork.Set<EducationalExperience>(); _mappingEngine = mappingEngine; }
public TeacherInServiceCourseTypeService(IUnitOfWork unitOfWork,ITitleService titleService, IApplicationUserManager userManager, IMappingEngine mappingEngine) { _userManager = userManager; _unitOfWork = unitOfWork; _TeacherInServiceCourseTypes = _unitOfWork.Set<TeacherInServiceCourseType>(); _mappingEngine = mappingEngine; _titleService = titleService; }
public RoleManagementService(IUnitOfWork uow, ICacheProvider cache) { _uow = uow; _role = uow.Set<Role>(); _userInRole = uow.Set<UserInRole>(); _actionRole = uow.Set<ActionRole>(); _cache = cache; }
public AppraiserService(IUnitOfWork unitOfWork, ITitleService titleService, IApplicationUserManager userManager, IMappingEngine mappingEngine) { _userManager = userManager; _unitOfWork = unitOfWork; _appraisers = _unitOfWork.Set<Appraiser>(); _titleService = titleService; _mappingEngine = mappingEngine; }
public EFWorkExperienceRepository(IUnitOfWork uow) { _uow = uow; _RWorkExperienceGroup = _uow.Set<WorkExperienceGroup>(); _RWorkExperience = _uow.Set<WorkExperience>(); _RWorkExperienceGallery = _uow.Set<WorkExperienceGallery>(); }
public BaseService(IUnitOfWork unitOfWork, IMapper mapper) { _unitOfWork = unitOfWork; _mapper = mapper; _entities = _unitOfWork.Set <TEntity>(); }
public GenericRepository(SampleContext context) { _context = context; _dbSet = context.Set <T>(); }
public GenericRepository(DbContext context) { this.context = context; this.set = context.Set <T>(); }
protected T Get <T>(int entityId, IDbSet <T> entities) where T : Entity { return(entities.SingleOrDefault(x => x.Id == entityId)); }
protected BaseRepository(RMContext context) { dataContext = context; dbSet = context.Set <T>(); }
public GenericRepository(DbContext context) { _entities = context; _dbset = context.Set <T>(); }
public StatisticsService(IUnitOfWork uow) { _statistics = uow.Set <Statistics>(); _countries = uow.Set <Country>(); }
public RepositoryBase(mysqlpiContext context) { this.context = context; dbset = context.Set <T>(); }
public EFRepository(DbContext dbContext) { _dbContext = dbContext; set = dbContext.Set <T>(); }
public PermissionService(IUnitOfWork2 unitOfWork, ICustomCache <string, IEnumerable <string> > permissionsCache) { _permissionsDbSet = unitOfWork.GetDbSet <Permission>(); _permissionsCache = permissionsCache; }
protected Repository(IDbFactory dbFactory) { DbFactory = dbFactory; dbset = Context.Set <T>(); }
protected GenericRepository(DbContext context) { Entities = context; Dbset = context.Set <T>(); }
public BaseRepository(IDbContext context) { Context = context; this.DbSet = Context.Set <TEntity>(); }
public Repository(ContosoDbContext context) { _context = context; dbSet = context.Set <T>(); }
public StockRepository(StockContext context) { _context = context; _dataSet = _context.Set <T>(); }
public BugsRepository(BugLoggerDbContext bugLoggerContext) { this.dbContext = bugLoggerContext; this.set = bugLoggerContext.Set <Bug>(); }
public Role_UserRepository() { _APPContext = ApplicationContext.getInstance(); _DbSet = _APPContext.Set <Role_User>(); }
private NetSqlQueryable(IDbSet dbSet, QueryBody queryBody) : base(dbSet, queryBody) { }
public ScoreTitleService(IUnitOfWork unitOfWork) { _unitOfWork = unitOfWork; _ScoreTitle = _unitOfWork.Set <ScoreTitle>(); }
/// <summary> /// Ctor /// </summary> /// <param name="context">Object context</param> public Repository(DemographicsDbContext context) { _context = context; this._dbSet = _context.Set <T>(); }
public TagService(IUnitOfWork uow) { _tags = uow.Set <Tag>(); }
protected RepositoryBase(IDbFactory dbFactory) { DbFactory = dbFactory; dbSet = DbContext.Set <T>(); }
protected void Add <T>(T entity, IDbSet <T> entities) where T : Entity { entities.Add(entity); Commit(); }
public static IEFBatchOperationBase <TContext, T> For <TContext, T>(TContext context, IDbSet <T> set) where TContext : DbContext where T : class { return(EFBatchOperation <TContext, T> .For(context, set)); }
public Repository(IDbContext context) { _context = context; _dbSet = context.Set <TEntity>(); }
public static void SeedEnumValues <T, TEnum>(this IDbSet <T> dbSet, Func <TEnum, T> converter) where T : class => Enum.GetValues(typeof(TEnum)) .Cast <object>() .Select(value => converter((TEnum)value)) .ToList() .ForEach(instance => dbSet.AddOrUpdate(instance));
protected RepositoryBase() { DbFactory = new DbFactory(); dbSet = DbContext.Set <T>(); }
public GenericRepository(MonolithDbContext unitOfWork) { _context = unitOfWork; _dbSet = _context.Set <T>(); }
public Repository(HospitalContext context) { _context = context; _dbSet = _context.Set <T>(); }
public VacationPageService(IUnitOfWork2 uow, IMapper mapper) { _vacationPagesDbSet = uow.GetDbSet <VacationPage>(); _mapper = mapper; _uow = uow; }