public ClaimViewModelController(ClaimContext claimContext, PatientContext patientContext, OrganizationContext organizationContext, IMapper mapper) { _claimContext = claimContext; _patientContext = patientContext; _organizationContext = organizationContext; _mapper = mapper; }
public Task Execute(IJobExecutionContext context) { using (var scope = _provider.CreateScope()) { _uploadContext = scope.ServiceProvider.GetService <UploadContext>(); _patientContext = scope.ServiceProvider.GetService <PatientContext>(); _organizationContext = scope.ServiceProvider.GetService <OrganizationContext>(); _claimContext = scope.ServiceProvider.GetService <ClaimContext>(); _logger.LogInformation("File Processing Job Initiated: " + DateTime.Now.ToString("dddd, MMMM dd, yyyy HH:mm:ss.fffK")); List <Upload> unprocessedUploads = GetUnprocessedUploads(); _logger.LogInformation("Count of files requiring processing: " + unprocessedUploads.Count); if (unprocessedUploads.Count > 0) { ProcessFiles(unprocessedUploads); } _logger.LogInformation("File Processing Job Completed: " + DateTime.Now.ToString("dddd, MMMM dd, yyyy HH:mm:ss.fffK")); } return(Task.CompletedTask); }
public DashboardController(PatientContext patientContext, OrganizationContext organizationContext, ClaimContext claimContext) { _patientContext = patientContext; _organizationContext = organizationContext; _claimContext = claimContext; }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, IConfiguration configuration, ILogger <Startup> logger, ClaimContext claimcontext, IGST gST, ILoggerFactory loggerFactory) { loggerFactory.AddConsole(configuration.GetSection("Logging")); loggerFactory.AddDebug(); loggerFactory.AddSerilog(); Log.Logger = new LoggerConfiguration() .MinimumLevel .Information() .WriteTo.RollingFile("Log - {Date}.txt", LogEventLevel.Information) .CreateLogger(); if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } else { //Global error handling for Exception app.UseExceptionHandler(appBuilder => { appBuilder.Run(async context => { context.Response.StatusCode = 500; await context.Response.WriteAsync("An Unexpected fault happened. Try again later." + "If issue persists, contac Administrator"); }); }); } //Set appbuilder to serve request incase for static file app.UseFileServer(); //AutoMapper AutoMapper.Mapper.Initialize(cfg => { cfg.CreateMap <Expenses, ClaimsDto>() .ForMember(dest => dest.costCenter, opt => opt.MapFrom(src => src.CostCenterId)) .ForMember(dest => dest.date, opt => opt.MapFrom(src => src.TransactionDate)) .ForMember(dest => dest.total, opt => opt.MapFrom(src => src.TotalAmount)) .ForMember(dest => dest.gstCalculated, opt => opt.MapFrom(src => gST.CalculateGST(src.TotalAmount))); cfg.CreateMap <ClaimsDto, Expenses>() .ForMember(dest => dest.CostCenterId, opt => opt.MapFrom(src => src.costCenter)) .ForMember(dest => dest.TransactionDate, opt => opt.MapFrom(src => src.date)) .ForMember(dest => dest.CreatedAt, opt => opt.MapFrom(src => DateTime.Now)) .ForMember(dest => dest.TotalAmount, opt => opt.MapFrom(src => src.total)) .ForMember(dest => dest.CostCenter, opt => opt.Ignore()); }); //Set middleware of MVC //app.UseMvcWithDefaultRoute(); if (!claimcontext.Expenses.Any()) { claimcontext.EnsureSeedDataForClaim(); } //Convention Base Route app.UseMvc(); app.Run(async(context) => { var greeting = configuration["Greeting"]; await context.Response.WriteAsync(greeting); }); }
public ClaimController(ClaimContext context, IMapper mapper) { _context = context; _mapper = mapper; }
public ClaimsController(ClaimContext context, IDataRepository <Claim> dataRepository) { _context = context; _dataRepository = dataRepository; }
public ClaimRepository(ClaimContext context) { _context = context; }
public ClaimRepository(ClaimContext dbContext) { _dbContext = dbContext; }