public BookingOrderFacade(IServiceProvider serviceProvider, MasterplanDbContext dbContext) { this.DbContext = dbContext; this.DbSet = this.DbContext.Set <BookingOrder>(); this.IdentityService = serviceProvider.GetService <IIdentityService>(); this.BookingOrderLogic = serviceProvider.GetService <BookingOrderLogic>(); }
public IEnumerable <ValidationResult> Validate(ValidationContext validationContext) { MasterplanDbContext dbContext = (MasterplanDbContext)validationContext.GetService(typeof(MasterplanDbContext)); if (dbContext.Sections.Count(p => p.IsDeleted.Equals(false) && p.Id != this.Id && p.Code.Equals(this.Code)) > 0) { yield return(new ValidationResult($"Section Code with {this.Code} is already exists", new List <string> { "Code" })); } if (string.IsNullOrWhiteSpace(this.Code)) { yield return(new ValidationResult("Section Code must be not empty", new List <string> { "Code" })); } if (string.IsNullOrWhiteSpace(this.Name)) { yield return(new ValidationResult("Section Name must be not empty", new List <string> { "Name" })); } }
public BookingOrderFacade(IServiceProvider serviceProvider, MasterplanDbContext dbContext) { this.DbContext = dbContext; this.DbSet = this.DbContext.Set <BookingOrder>(); this.BookingOrderLogic = serviceProvider.GetService <BookingOrderLogic>(); this.BookingOrderDetailLogic = serviceProvider.GetService <BookingOrderDetailLogic>(); this.BlockingPlanLogic = serviceProvider.GetService <BlockingPlanLogic>(); }
public WeeklyplanFacade(IServiceProvider serviceProvider, MasterplanDbContext dbContext) { this.DbContext = dbContext; this.DbSet = this.DbContext.Set <WeeklyPlan>(); this.IdentityService = serviceProvider.GetService <IdentityService>(); this.WeeklyPlanLogic = serviceProvider.GetService <WeeklyPlanLogic>(); this.ValidateService = serviceProvider.GetService <ValidateService>(); }
public BlockingPlanLogic(BookingOrderLogic bookingOrderLogic, BookingOrderDetailLogic bookingOrderDetailLogic, BlockingPlanWorkScheduleLogic blockingPlanWorkScheduleLogic, WeeklyPlanLogic weeklyPlanLogic, IIdentityService identityService, MasterplanDbContext dbContext) : base(identityService, dbContext) { this.BlockingPlanWorkScheduleLogic = blockingPlanWorkScheduleLogic; this.BookingOrderLogic = bookingOrderLogic; this.DbContext = dbContext; this.BookingOrderDetailLogic = bookingOrderDetailLogic; this.WeeklyPlanLogic = weeklyPlanLogic; _DbSet = dbContext.Set <BookingOrderDetail>(); _blockingPlans = dbContext.Set <BlockingPlan>(); }
public BlockingPlanFacade(IServiceProvider serviceProvider, IIdentityService identityService, BlockingPlanWorkScheduleLogic blockingPlanWorkScheduleLogic, MasterplanDbContext dbContext) : base(identityService, dbContext) { this.DbContext = dbContext; this.DbSet = this.DbContext.Set <BlockingPlan>(); this._BookingOrderDbSet = this.DbContext.Set <BookingOrder>(); this._WeeklyPlanItemDbSet = this.DbContext.Set <WeeklyPlanItem>(); this._BPWorkSchedulesDbSet = this.DbContext.Set <BlockingPlanWorkSchedule>(); this.BlockingPlanLogic = serviceProvider.GetService <BlockingPlanLogic>(); this.BookingOrderLogic = serviceProvider.GetService <BookingOrderLogic>(); this._weeklyPlanLogic = serviceProvider.GetService <WeeklyPlanLogic>(); this._BlockingPlanWorkScheduleLogic = blockingPlanWorkScheduleLogic; }
public BlockingPlanWorkScheduleLogic(IIdentityService identityService, MasterplanDbContext dbContext) : base(identityService, dbContext) { }
public BaseLogic(IIdentityService identityService, MasterplanDbContext dbContext) { this.DbSet = dbContext.Set <TModel>(); this.IdentityService = identityService; }
public SectionFacade(IServiceProvider serviceProvider, MasterplanDbContext dbContext) { this.DbContext = dbContext; this.DbSet = this.DbContext.Sections; this.SectionLogic = serviceProvider.GetService <SectionLogic>(); }
public WeeklyPlanLogic(IIdentityService identityService, MasterplanDbContext dbContext) : base(identityService, dbContext) { _dbContext = dbContext; }
public WeeklyPlanItemFacade(IServiceProvider serviceProvider, MasterplanDbContext dbContext) { this.DbContext = dbContext; this.DbSet = this.DbContext.Set <WeeklyPlanItem>(); }
public BookingOrderDetailLogic(IIdentityService identityService, MasterplanDbContext dbContext, BookingOrderDetail bookingOrderDetail) : base(identityService, dbContext) { _dbContext = dbContext; BookingOrderDetail = bookingOrderDetail; _bookingOrder = _dbContext.Set <BookingOrder>(); }
public BookingOrderLogic(IServiceProvider serviceProvider, MasterplanDbContext dbContext) : base(serviceProvider, dbContext) { }
public BaseLogic(IServiceProvider serviceProvider, MasterplanDbContext dbContext) { this.DbSet = dbContext.Set <TModel>(); this.IdentityService = serviceProvider.GetService <IIdentityService>(); this.QueryHelper = new QueryHelper <TModel>(); }
public SectionLogic(IIdentityService identityService, MasterplanDbContext dbContext) : base(identityService, dbContext) { }
public SectionLogic(IServiceProvider serviceProvider, MasterplanDbContext dbContext) : base(serviceProvider, dbContext) { }
public WeeklyPlanLogic(IServiceProvider serviceProvider, MasterplanDbContext dbContext) : base(serviceProvider, dbContext) { }
public BookingOrderLogic(BookingOrderDetailLogic bookingOrderDetailLogic, IIdentityService identityService, MasterplanDbContext dbContext) : base(identityService, dbContext) { this.BookingOrderDetailLogic = bookingOrderDetailLogic; DbContext = dbContext; }