public static DbContext GetAlmacenContext() { DbContextOptions <AlmacenDbContext> options = new DbContextOptionsBuilder <AlmacenDbContext>() .UseInMemoryDatabase(Guid.NewGuid().ToString()) .EnableSensitiveDataLogging() .Options; var context = new AlmacenDbContext(options); context.Database.EnsureDeleted(); //agregando datos context.SaveChanges(); return(context); }
public BaseTest() { DbContextOptions <ApplicationDbContext> options = new DbContextOptionsBuilder <ApplicationDbContext>() .UseInMemoryDatabase(Guid.NewGuid().ToString()) .EnableSensitiveDataLogging() .Options; _db = new ApplicationDbContext(options); _db.Database.EnsureCreated(); AddData(); DbContextOptions <AlmacenDbContext> optionsAlmacen = new DbContextOptionsBuilder <AlmacenDbContext>() .UseInMemoryDatabase(Guid.NewGuid().ToString()) .EnableSensitiveDataLogging() .Options; _dbAlmacen = new AlmacenDbContext(optionsAlmacen); _dbAlmacen.Database.EnsureCreated(); }
public ProductRepository(AlmacenDbContext ctx) { context = ctx; }
public AprobacionEconomiaController(EconomiaDbContext context) { _context = context; _almacen = new AlmacenDbContext(); }
public SolicitudesController(AmasBDbContext context) { _context = context; _almacen = new AlmacenDbContext(); }
public EFOrderRepository(AlmacenDbContext ctx) { context = ctx; }