예제 #1
0
 public SermonManager(ChurchDbContext context)
 {
     _context = context;
 }
예제 #2
0
 public UserController(ChurchDbContext dbContext)
 {
     context = dbContext;
 }
예제 #3
0
 public AlbumManager(ChurchDbContext context)
 {
     _context = context;
 }
예제 #4
0
 public ChurchController(ChurchDbContext dbContext)
 {
     context = dbContext;
 }
 public DenominationController(ChurchDbContext dbContext)
 {
     context = dbContext;
 }
예제 #6
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory, ChurchDbContext context)
        {
            loggerFactory.AddConsole(Configuration.GetSection("Logging"));
            loggerFactory.AddDebug();

            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
                //app.UseBrowserLink();
            }
            else
            {
                app.UseExceptionHandler("/Home/Error");
            }

            app.UseStaticFiles();

            app.UseMvc(routes =>
            {
                routes.MapRoute(
                    name: "default",
                    template: "{controller=Church}/{action=Index}/{id?}");
            });
            context.Database.EnsureCreated();
        }