public JoueursController(ProjetTp1Context context) { _context = context; }
public CurrentPartieController(ProjetTp1Context context) { _context = context; }
public QuestionsController(ProjetTp1Context context) { _context = context; }
public VillesController(ProjetTp1Context context) { _context = context; }
public LoginController(ProjetTp1Context context) { _context = context; }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ProjetTp1Context context) { try { context.Database.Migrate(); } catch (Exception e) { System.Diagnostics.Debug.Print(e.ToString()); } try { string script_verbe = File.ReadAllText("Migrations/Scripts données/dbo.Verbe.data.sql"); string script_villes = File.ReadAllText("Migrations/Scripts données/dbo.Ville.data.sql"); if (context.Verbe.Count() < 161) { if (context.Verbe.Count() > 0) { context.Database.ExecuteSqlRaw("DELETE FROM dbo.Verbe"); } context.Database.ExecuteSqlRaw(script_verbe); } if (context.Ville.Count() < 38000) { if (context.Ville.Count() > 0) { context.Database.ExecuteSqlRaw("DELETE FROM dbo.Ville"); } context.Database.ExecuteSqlRaw(script_villes); } } catch { } if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } else { app.UseExceptionHandler("/Error"); // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. app.UseHsts(); } app.UseHttpsRedirection(); app.UseStaticFiles(); app.UseRouting(); //begin cookies app.UseCookiePolicy(); app.UseAuthentication(); app.UseAuthorization(); //end cookies app.UseEndpoints(endpoints => { endpoints.MapBlazorHub(); endpoints.MapFallbackToPage("/_Host"); endpoints.MapControllerRoute("default", "{controller=Home}/{action=Index}/{id?}"); }); }
public NoDuplicateAttribute(ProjetTp1Context context, bool type) { _context = context; //_pseudo = pseudo; _type = type; }
public PartiesController(ProjetTp1Context context) { _context = context; }