Example #1
0
        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");
            });
        }
Example #2
0
 public PsychologistRepository(PsychologistContext context)
 {
     _context = context;
 }
Example #3
0
 public PsychologistController(IPsychologistRepository repository, PsychologistContext context, IHostingEnvironment environment)
 {
     _context     = context;
     _repository  = repository;
     _environment = environment;
 }