// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env, RelibreContext context) { // context.Database.Migrate(); // var supportedCultures = "pt-BR"; // var localizationOptions = new RequestLocalizationOptions() // .SetDefaultCulture(supportedCultures) // .AddSupportedCultures(supportedCultures) // .AddSupportedUICultures(supportedCultures); // app.UseRequestLocalization(localizationOptions); app.UseSwagger(); app.UseSwaggerUI(c => { c.SwaggerEndpoint("/swagger/v1/swagger.json", "Relibre Api"); }); if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } else { app.UseHsts(); } app.UseHttpsRedirection(); app.UseRouting(); app.UseCors("policy"); app.UseExceptionHandler(x => { x.Run( async context => { context.Response.StatusCode = (int)HttpStatusCode.InternalServerError; context.Response.ContentType = Constants.DefaultContentType; var exception = context.Features.Get <IExceptionHandlerFeature>(); if (exception != null) { await context.Response.WriteAsync( Util.ReturnException((Exception)exception).ToString()) .ConfigureAwait(false); } }); }); app.UseAuthentication(); app.UseAuthorization(); app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); }
public BookRepository( RelibreContext context ) { _context = context; }
public NotificationPersonRepository( RelibreContext context ) { _context = context; }
public UnitOfWork(RelibreContext context) { _context = context; }
public UserRepository( RelibreContext context ) { _context = context; }
public ContactRepository( RelibreContext context ) { _context = context; }
public EmailVerificationRepository( RelibreContext context ) { _context = context; }
public AuthorRepository( RelibreContext context ) { _context = context; }
public SubscriptionRepository( RelibreContext context ) { _context = context; }
public TypeRepository( RelibreContext context ) { _context = context; }
public ProfileRepository( RelibreContext context ) { _context = context; }
public LibraryRepository( RelibreContext context ) { _context = context; }
public CategoryRepository( RelibreContext context ) { _context = context; }