public void initContext() { var options = new DbContextOptionsBuilder<DbRestauranteContext>() .UseInMemoryDatabase(databaseName: "Test_NxRestaurante").Options; // Set up a context (connection to the "DB") for writing using (var _context = new DbRestauranteContext(options)) { _context.TipoIdentificacion.AddAsync(new Entities.TipoIdentificacion { descripcion = "CC" }); _context.TipoIdentificacion.AddAsync(new Entities.TipoIdentificacion { descripcion = "TI" }); _context.TipoIdentificacion.AddAsync(new Entities.TipoIdentificacion { descripcion = "CE" }); _context.SaveChangesAsync(); _context.Usuario.AddAsync(new Entities.Usuario { identidad = "1017143560", nombre = "Milker", apellido = "Sanchez", contrasenia = "123456", email = "*****@*****.**", tipo = new Entities.TipoIdentificacion { id = 1, descripcion = "CC" } }); _context.SaveChangesAsync(); dbCarvajalTestContext = _context; } }
public CocinerosController(DbRestauranteContext context) { _context = context; }
public DetalleFacturasController(DbRestauranteContext context) { _context = context; }
public MesasController(DbRestauranteContext context) { _context = context; }
public ClientesController(DbRestauranteContext context) { _context = context; }