private static InfoCovidDbContext GetDbContext() { var builder = new DbContextOptionsBuilder <InfoCovidDbContext>(); builder.UseInMemoryDatabase("covidinfo"); var options = builder.Options; var context = new InfoCovidDbContext(options); if (context.CasosCovid.Count() == 0) { context.AddRange(CasosCovidData.GetFakeCasos()); context.SaveChanges(); } return(context); }
public ReporteCasoController(InfoCovidDbContext context) { _context = context; }
public CasosCovidController(InfoCovidDbContext context) { _context = context; }