public InvoiceValidator(ServiceTitanJobModel jobModel, A1ServicesAppDbContext ctx) { _ctx = ctx; var materialValidatorFactory = new TaskMaterialValidatorFactory(_ctx); _materialValidatorFactory = materialValidatorFactory; Job = jobModel; Invoice = jobModel.Invoice; ValidationState = new ValidInvoice(); ServiceItems = jobModel.Invoice.Items.Where(i => i.Active == true).Where(i => i.Sku.Type == "Service").ToList(); MaterialItems = jobModel.Invoice.Items.Where(i => i.Active == true).Where(i => i.Sku.Type == "Material").ToList(); MaterialValidators = CreateValidators(); }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, A1ServicesAppDbContext dbContext) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } else { // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. app.UseHsts(); } //dbContext.EnsureSeedData(); app.UseHttpsRedirection(); app.UseMvc(); }
public CreateNewJobServiceMaterialLinkCommandHandler(IMapper mapper, A1ServicesAppDbContext ctx) { _mapper = mapper; _ctx = ctx; }
public InvoiceController(IMediator mediator, A1ServicesAppDbContext ctx) { _mediator = mediator; _ctx = ctx; }
public FindJobsWithMismatchedJobMaterialsQueryHandler(IMapper mapper, A1ServicesAppDbContext ctx) { _mapper = mapper; _ctx = ctx; }
public GetAllJobServicesQueryHandler(IMapper mapper, A1ServicesAppDbContext ctx) { _mapper = mapper; _ctx = ctx; }
public GetJobServiceMaterialLinkByIdQueryHandler(IMapper mapper, A1ServicesAppDbContext ctx) { _mapper = mapper; _ctx = ctx; }
public GetAllJobMaterialLinksQueryHandler(A1ServicesAppDbContext ctx, IMapper mapper) { _mapper = mapper; _ctx = ctx; }
public TaskMaterialValidatorFactory(A1ServicesAppDbContext ctx) { _ctx = ctx; }
public ValidateJobInvoiceCommandHandler(A1ServicesAppDbContext ctx) { _ctx = ctx; }