public static CoffeeMachineDbContext Create() { var options = new DbContextOptionsBuilder <CoffeeMachineDbContext>() .UseInMemoryDatabase(Guid.NewGuid().ToString()) .Options; var context = new CoffeeMachineDbContext(options); context.Database.EnsureCreated(); context.DrinkType.AddRange(new[] { new DrinkType { DrinkTypeId = 1, DrinkTypeName = "Tea", Description = "Fresh And Juicy Tea....." }, new DrinkType { DrinkTypeId = 2, DrinkTypeName = "Chocolate Tea", Description = "Fresh Chocolate..." }, new DrinkType { DrinkTypeId = 3, DrinkTypeName = "Coffee", Description = " Yummy Coffeee with Good Taste" }, }); context.SaveChanges(); return(context); }
public CoffeeRepository(CoffeeMachineDbContext dbContext) : base(dbContext) { }
public UnitOfWork(CoffeeMachineDbContext entities) { this._entities = entities; }
public CreateOrderBadgeLastOrderCommand(CoffeeMachineDbContext context) { _context = context; }
public IngredientRepository(CoffeeMachineDbContext dbContext, IBaseRepository <Ingredient> repo) : base(dbContext) { this.repo = repo; }
public static void Destroy(CoffeeMachineDbContext context) { context.Database.EnsureDeleted(); context.Dispose(); }
public CoffeeController(CoffeeMachineDbContext context) { _context = context; }
public GetDrinkTypeAllQuery(CoffeeMachineDbContext context) { _context = context; }
public GetBadgeLastOrderQuery(CoffeeMachineDbContext context) { _context = context; }
public GetBadgeLastOrderQueryTest() { _context = CoffeeMachineContextFactory.Create(); }
public BaseRepository(CoffeeMachineDbContext dbContext) { this.dbContext = dbContext; }