public static void Main(string[] args) { var optionsBuilder = new DbContextOptionsBuilder <BhsDbContext>(); optionsBuilder.UseInMemoryDatabase("bhs"); using (var context = new BhsDbContext(optionsBuilder.Options)) { // Precisa ser chamado no início da aplicação para popular o banco de dados in-memory context.Database.EnsureCreated(); } CreateHostBuilder(args).Build().Run(); }
public SellersController(BhsDbContext context) { _context = context; }
public SalesController(BhsDbContext bhsDbContext) { _bhsDbContext = bhsDbContext; }
public VehiclesController(BhsDbContext context) { _context = context; }