// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, APIReactContext context) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } //context.Database.EnsureDeleted(); context.Database.EnsureCreated(); if (!context.Users.Any()) { context.Users.Add(new DAL.Models.User() { Login = "******", Password = "******" }); context.SaveChanges(); } app.UseAuthentication(); // 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", "My API V1"); }); app.UseStaticFiles(); app.UseMvc(); }
public ServiceUser(APIReactContext manager) { _manager = manager; }
public ServiceFilm(APIReactContext manager) { _manager = manager; }
public ServiceTheme(APIReactContext manager) { _manager = manager; }