// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, STIContext context) { if (env.IsDevelopment()) { //app.UseBrowserLink(); app.UseDeveloperExceptionPage(); } else { app.UseExceptionHandler("/Home/Error"); app.UseHsts(); } app.UseHttpsRedirection(); app.UseStaticFiles(); app.UseCookiePolicy(); app.UseMvc(routes => { routes.MapRoute( name: "default", template: "{controller=Home}/{action=Index}/{id?}"); }); DbInitializer.Initialize(context); }
public static void Initialize(STIContext context) { context.Database.EnsureCreated(); if (context.ejercicios.Any()) { return; } var ejercicios = new ejercicios[] { // }; foreach (ejercicios a in ejercicios) { context.ejercicios.Add(a); } context.SaveChanges(); }
public static void Initialize(STIContext context) { context.Database.EnsureCreated(); if (context.temas_curso.Any()) { return; } var temas_curso = new temas_curso[] { }; foreach (temas_curso a in temas_curso) { context.temas_curso.Add(a); { context.SaveChanges(); } } }
public resultados_ejerciciosController(STIContext context) { _context = context; }
public cursoesController(STIContext context) { _context = context; }
public temas_cursoController(STIContext context) { _context = context; }
public ejerciciosController(STIContext context) { _context = context; }