public void Configure(IApplicationBuilder app, IHostingEnvironment env, PsychologistContext psychologistContext) { psychologistContext.Database.EnsureDeleted(); psychologistContext.Database.EnsureCreated(); app.UseStaticFiles(); app.UseAuthentication(); app.UseMvc(routes => { routes.MapRoute( name: "Default", template: "{controller}/{action}", defaults: new { controller = "Home", action = "Index" }); }); app.Run(async(context) => { await context.Response.WriteAsync("Page not found"); }); }
public PsychologistRepository(PsychologistContext context) { _context = context; }
public PsychologistController(IPsychologistRepository repository, PsychologistContext context, IHostingEnvironment environment) { _context = context; _repository = repository; _environment = environment; }