/// <summary> /// ctor /// </summary> public UnitOfWork(IBreezeValidator breezevalidator) { _contextProvider = new EFContextProvider<EnergyNetworkDbContext>(); _contextProvider.BeforeSaveEntitiesDelegate = breezevalidator.BeforeSaveEntities; _contextProvider.BeforeSaveEntityDelegate = breezevalidator.BeforeSaveEntity; _audit = _contextProvider.Context.BeginAudit(AuditLoggerConfig.GetConfiguredAuditLogger()); NetworkRepository = new Repository<Network>(_contextProvider.Context); CompanyRepository = new Repository<Company>(_contextProvider.Context); NetworkCompanyRepository = new Repository<NetworkCompany>(_contextProvider.Context); MeasureRepository = new Repository<Measure>(_contextProvider.Context); InvitationRepository = new Repository<Invitation>(_contextProvider.Context); MeasureStateRepository = new Repository<MeasureState>(_contextProvider.Context); EnergySourceRepository = new Repository<EnergySource>(_contextProvider.Context); OutputUnitRepository = new Repository<OutputUnit>(_contextProvider.Context); EnergySavingRepository = new Repository<EnergySaving>(_contextProvider.Context); SurveyRepository = new Repository<Survey>(_contextProvider.Context); UserProfileRepository = new Repository<UserProfile>(_contextProvider.Context); DocumentContentRepository = new Repository<DocumentContent>(_contextProvider.Context); DocumentRepository = new Repository<Document>(_contextProvider.Context); InvestmentPlanRepository = new Repository<InvestmentPlan>(_contextProvider.Context); ComparisonRepository = new Repository<Comparison>(_contextProvider.Context); AreaRepository = new Repository<Area>(_contextProvider.Context); ProductRepository = new Repository<Product>(_contextProvider.Context); ProductionTimeRepository = new Repository<ProductionTime>(_contextProvider.Context); ReadingRepository = new Repository<Reading>(_contextProvider.Context); ImportantTopicRepository = new Repository<ImportantTopic>(_contextProvider.Context); ChangeSetRepository = new Repository<ChangeSet>(_contextProvider.Context); ChangeRepository = new Repository<Change>(_contextProvider.Context); CompanySizeRepository = new Repository<CompanySize>(_contextProvider.Context); FiscalYearRepository = new Repository<FiscalYear>(_contextProvider.Context); OperationTimeRepository = new Repository<OperationTime>(_contextProvider.Context); }
/// <summary> /// ctor /// </summary> public UnitOfWork(IBreezeValidator breezevalidator) { _contextProvider = new EFContextProvider <EnergyNetworkDbContext>(); _contextProvider.BeforeSaveEntitiesDelegate = breezevalidator.BeforeSaveEntities; _contextProvider.BeforeSaveEntityDelegate = breezevalidator.BeforeSaveEntity; _audit = _contextProvider.Context.BeginAudit(AuditLoggerConfig.GetConfiguredAuditLogger()); NetworkRepository = new Repository <Network>(_contextProvider.Context); CompanyRepository = new Repository <Company>(_contextProvider.Context); NetworkCompanyRepository = new Repository <NetworkCompany>(_contextProvider.Context); MeasureRepository = new Repository <Measure>(_contextProvider.Context); InvitationRepository = new Repository <Invitation>(_contextProvider.Context); MeasureStateRepository = new Repository <MeasureState>(_contextProvider.Context); EnergySourceRepository = new Repository <EnergySource>(_contextProvider.Context); OutputUnitRepository = new Repository <OutputUnit>(_contextProvider.Context); EnergySavingRepository = new Repository <EnergySaving>(_contextProvider.Context); SurveyRepository = new Repository <Survey>(_contextProvider.Context); UserProfileRepository = new Repository <UserProfile>(_contextProvider.Context); DocumentContentRepository = new Repository <DocumentContent>(_contextProvider.Context); DocumentRepository = new Repository <Document>(_contextProvider.Context); InvestmentPlanRepository = new Repository <InvestmentPlan>(_contextProvider.Context); ComparisonRepository = new Repository <Comparison>(_contextProvider.Context); AreaRepository = new Repository <Area>(_contextProvider.Context); ProductRepository = new Repository <Product>(_contextProvider.Context); ProductionTimeRepository = new Repository <ProductionTime>(_contextProvider.Context); ReadingRepository = new Repository <Reading>(_contextProvider.Context); ImportantTopicRepository = new Repository <ImportantTopic>(_contextProvider.Context); ChangeSetRepository = new Repository <ChangeSet>(_contextProvider.Context); ChangeRepository = new Repository <Change>(_contextProvider.Context); CompanySizeRepository = new Repository <CompanySize>(_contextProvider.Context); FiscalYearRepository = new Repository <FiscalYear>(_contextProvider.Context); OperationTimeRepository = new Repository <OperationTime>(_contextProvider.Context); }
/// <summary> /// ctor /// </summary> public UnitOfWork(IBreezeValidator breezevalidator) { contextProvider = new EFContextProvider<DurandalAuthDbContext>(); contextProvider.BeforeSaveEntitiesDelegate = breezevalidator.BeforeSaveEntities; contextProvider.BeforeSaveEntityDelegate = breezevalidator.BeforeSaveEntity; ArticleRepository = new ArticleRepository(contextProvider.Context); CategoryRepository = new Repository<Category>(contextProvider.Context); TagRepository = new Repository<Tag>(contextProvider.Context); UserProfileRepository = new Repository<UserProfile>(contextProvider.Context); }
/// <summary> /// ctor /// </summary> public UnitOfWork(IBreezeValidator breezevalidator) { contextProvider = new EFContextProvider <DurandalAuthDbContext>(); contextProvider.BeforeSaveEntitiesDelegate = breezevalidator.BeforeSaveEntities; contextProvider.BeforeSaveEntityDelegate = breezevalidator.BeforeSaveEntity; ArticleRepository = new ArticleRepository(contextProvider.Context); CategoryRepository = new Repository <Category>(contextProvider.Context); TagRepository = new Repository <Tag>(contextProvider.Context); UserProfileRepository = new Repository <UserProfile>(contextProvider.Context); }
/// <summary> /// Initializes a new instance of the <see cref="UnitOfWork"/> class. /// ctor /// </summary> /// <param name="breezevalidator"> /// The breezevalidator. /// </param> public UnitOfWork(IBreezeValidator breezevalidator) { this._contextProvider = new EFContextProvider <DurandalAuthDbContext> { BeforeSaveEntitiesDelegate = breezevalidator .BeforeSaveEntities, BeforeSaveEntityDelegate = breezevalidator .BeforeSaveEntity }; this.ArticleRepository = new ArticleRepository(this._contextProvider.Context); this.CategoryRepository = new Repository <Category>(this._contextProvider.Context); this.TagRepository = new Repository <Tag>(this._contextProvider.Context); this.UserProfileRepository = new Repository <UserProfile>(this._contextProvider.Context); this.ProfileRepository = new Repository <Profile>(this._contextProvider.Context); this.ProvinceRepository = new Repository <ProvinceLookup>(this._contextProvider.Context); // this.CityRepository = new Repository<CityNameLookup>(this._contextProvider.Context); this.EthnicityRepository = new Repository <EthnicityLookup>(this._contextProvider.Context); this.GenderRepository = new Repository <GenderLookup>(this._contextProvider.Context); /*this.PsiraGradeRepository = new Repository<PsiraGradeLookup>(this._contextProvider.Context); * this.PsiraCategoryRepository = new Repository<PsiraCategoryLookup>(this._contextProvider.Context); * this.SecurityTrainingRepository = new Repository<SecurityTrainingLookup>(this._contextProvider.Context); * this.EmploymentStatusRepository = new Repository<EmploymentStatusLookup>(this._contextProvider.Context); * this.NationalityRepository = new Repository<NationalityLookup>(this._contextProvider.Context); * this.LanguangeRepository = new Repository<LanguageLookup>(this._contextProvider.Context);*/ this.YesNoRepository = new Repository <YesNoLookup>(this._contextProvider.Context); // this.MaritalStatusRepository = new Repository<MaritalStatusLookup>(this._contextProvider.Context); this.AddressLookupRepository = new Repository <AddressLookup>(this._contextProvider.Context); this.EntityLookupRepository = new Repository <EntityTypeLookup>(this._contextProvider.Context); this.TitleLookupRepository = new Repository <TitleLookup>(this._contextProvider.Context); this.AddressRepository = new Repository <Address>(this._contextProvider.Context); this.ContactRepository = new Repository <Contact>(this._contextProvider.Context); this.IndividualRepository = new Repository <Individual>(this._contextProvider.Context); this.CompanyRepository = new Repository <Enterprise>(this._contextProvider.Context); /*this.RmRepository = new Repository<rm>(this._contextProvider.Context); * this.EmRepository = new Repository<em>(this._contextProvider.Context); * this.BlRepository = new Repository<bl>(this._contextProvider.Context); * this.FlRepository = new Repository<fl>(this._contextProvider.Context);*/ }
/// <summary> /// Initializes a new instance of the <see cref="UnitOfWork"/> class. /// ctor /// </summary> /// <param name="breezevalidator"> /// The breezevalidator. /// </param> public UnitOfWork(IBreezeValidator breezevalidator) { this._contextProvider = new EFContextProvider<DurandalAuthDbContext> { BeforeSaveEntitiesDelegate = breezevalidator .BeforeSaveEntities, BeforeSaveEntityDelegate = breezevalidator .BeforeSaveEntity }; this.ArticleRepository = new ArticleRepository(this._contextProvider.Context); this.CategoryRepository = new Repository<Category>(this._contextProvider.Context); this.TagRepository = new Repository<Tag>(this._contextProvider.Context); this.UserProfileRepository = new Repository<UserProfile>(this._contextProvider.Context); this.ProfileRepository = new Repository<Profile>(this._contextProvider.Context); this.ProvinceRepository = new Repository<ProvinceLookup>(this._contextProvider.Context); // this.CityRepository = new Repository<CityNameLookup>(this._contextProvider.Context); this.EthnicityRepository = new Repository<EthnicityLookup>(this._contextProvider.Context); this.GenderRepository = new Repository<GenderLookup>(this._contextProvider.Context); /*this.PsiraGradeRepository = new Repository<PsiraGradeLookup>(this._contextProvider.Context); this.PsiraCategoryRepository = new Repository<PsiraCategoryLookup>(this._contextProvider.Context); this.SecurityTrainingRepository = new Repository<SecurityTrainingLookup>(this._contextProvider.Context); this.EmploymentStatusRepository = new Repository<EmploymentStatusLookup>(this._contextProvider.Context); this.NationalityRepository = new Repository<NationalityLookup>(this._contextProvider.Context); this.LanguangeRepository = new Repository<LanguageLookup>(this._contextProvider.Context);*/ this.YesNoRepository = new Repository<YesNoLookup>(this._contextProvider.Context); // this.MaritalStatusRepository = new Repository<MaritalStatusLookup>(this._contextProvider.Context); this.AddressLookupRepository = new Repository<AddressLookup>(this._contextProvider.Context); this.EntityLookupRepository = new Repository<EntityTypeLookup>(this._contextProvider.Context); this.TitleLookupRepository = new Repository<TitleLookup>(this._contextProvider.Context); this.AddressRepository = new Repository<Address>(this._contextProvider.Context); this.ContactRepository = new Repository<Contact>(this._contextProvider.Context); this.IndividualRepository = new Repository<Individual>(this._contextProvider.Context); this.CompanyRepository = new Repository<Enterprise>(this._contextProvider.Context); /*this.RmRepository = new Repository<rm>(this._contextProvider.Context); this.EmRepository = new Repository<em>(this._contextProvider.Context); this.BlRepository = new Repository<bl>(this._contextProvider.Context); this.FlRepository = new Repository<fl>(this._contextProvider.Context);*/ }
public UnitOfWork(IBreezeValidator breezeValidator) { ContextProvider = new EFContextProvider<FacsalDbContext>(); ContextProvider.BeforeSaveEntitiesDelegate = breezeValidator.BeforeSaveEntities; ContextProvider.BeforeSaveEntityDelegate = breezeValidator.BeforeSaveEntity; AppointmentTypeRepository = new Repository<AppointmentType>(ContextProvider.Context); BaseSalaryAdjustmentRepository = new Repository<BaseSalaryAdjustment>(ContextProvider.Context); DepartmentRepository = new Repository<Department>(ContextProvider.Context); EmploymentRepository = new Repository<Employment>(ContextProvider.Context); FacultyTypeRepository = new Repository<FacultyType>(ContextProvider.Context); LeaveTypeRepository = new Repository<LeaveType>(ContextProvider.Context); MeritAdjustmentTypeRepository = new Repository<MeritAdjustmentType>(ContextProvider.Context); PersonRepository = new Repository<Person>(ContextProvider.Context); RankTypeRepository = new Repository<RankType>(ContextProvider.Context); RoleRepository = new Repository<Role>(ContextProvider.Context); RoleAssignmentRepository = new Repository<RoleAssignment>(ContextProvider.Context); SalaryRepository = new Repository<Salary>(ContextProvider.Context); SpecialAdjustmentTypeRepository = new Repository<SpecialAdjustmentType>(ContextProvider.Context); StatusTypeRepository = new Repository<StatusType>(ContextProvider.Context); UnitRepository = new Repository<Unit>(ContextProvider.Context); UserRepository = new Repository<User>(ContextProvider.Context); }