public ReceiptService(ILogger <ReceiptService> logger, ShutterCartContext repo, IMapper mapper, IUserPointService point) { _logger = logger; _repo = repo; _mapper = mapper; _point = point; }
public ProductService(ILogger <ProductService> logger, ShutterCartContext repo, IMapper mapper) { _logger = logger; _repo = repo; // _config = config; _mapper = mapper; }
public QuestionService(ILogger <QuestionService> logger, ShutterCartContext repo, IMapper mapper, IUserPointService userPoint) { _logger = logger; _repo = repo; _mapper = mapper; _userPoint = userPoint; }
public VideoServices(ILogger <VideoServices> logger, ShutterCartContext repo, IMapper mapper, IUserPointService userPoint) { _logger = logger; _repo = repo; _mapper = mapper; this.userPoint = userPoint; }
public AdvertService(ILogger <AdvertService> logger, ShutterCartContext repo, IConfiguration config, IMapper mapper) { _logger = logger; _repo = repo; _config = config; _mapper = mapper; }
public UserRepository(ShutterCartContext db, IMapper mapper, ILogger <UserRepository> logger, IConfiguration config) { _db = db; _mapper = mapper; _logger = logger; this.config = config; }
public DashboardService(ILogger <DashboardService> logger, ShutterCartContext repo) { _logger = logger; _repo = repo; }
public UserPointService(ILogger <UserPointService> logger, ShutterCartContext repo, IMapper mapper) { _logger = logger; _repo = repo; _mapper = mapper; }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, ShutterCartContext _context, ILoggerFactory loggerFactory) { loggerFactory.AddConsole(_config.GetSection("Logging")); loggerFactory.AddDebug(); loggerFactory.AddConsole(); //FileLoggerProvider loggerFactory.AddFile("Logs/shuttercart-{Date}.txt"); // Enable middleware to serve generated Swagger as a JSON endpoint. app.UseSwagger(); // Enable middleware to serve swagger-ui (HTML, JS, CSS, etc.), // specifying the Swagger JSON endpoint. app.UseSwaggerUI(c => { c.SwaggerEndpoint("/swagger/v1/swagger.json", "NovaCart"); c.RoutePrefix = "swagger"; }); if (env.IsProduction()) { app.UseDeveloperExceptionPage(); app.UseBrowserLink(); } else { app.UseExceptionHandler("/error"); } app.UseExceptionHandler( builder => { builder.Run( async context => { context.Response.StatusCode = (int)HttpStatusCode.InternalServerError; context.Response.Headers.Add("Access-Control-Allow-Origin", "*"); var error = context.Features.Get <IExceptionHandlerFeature>(); if (error != null) { // context.Response.AddApplicationError(error.Error.Message); await context.Response.WriteAsync(error.Error.Message).ConfigureAwait(false); } }); }); //app.UserCorsMiddleWare(); app.UseDefaultFiles(); app.UseStaticFiles(); app.UseAuthentication(); //if (env.IsDevelopment()) // ShutterCartSeeder.Seed(_context); app.UseMvc(); }
/// <summary> /// /// </summary> /// <param name="logger"></param> /// <param name="repo"></param> /// <param name="mapper"></param> public ReportService(ILogger <ReportService> logger, ShutterCartContext repo, IMapper mapper) { _logger = logger; _repo = repo; _mapper = mapper; }