/// <summary> /// Konstruktor dla okna Sprawdz przepis, wymaga bazy danych <paramref name="context"/> /// </summary> /// <param name="context"></param> public Check(RecipeBookContext context) : base() { InitializeComponent(); this._context = context; recipeList.ItemsSource = _context.Dishes.ToList(); }
public Modify(RecipeBookContext context) { InitializeComponent(); this._context = context; productTypeComboBox.ItemsSource = _context.ProductTypes.ToList(); recipeList.ItemsSource = _context.Dishes.ToList(); productList.ItemsSource = _context.Products.ToList(); dishTypeComboBox.ItemsSource = _context.DishTypes.ToList(); }
private BookRepository InMemoryBookRepository() { DbContextOptions <RecipeBookContext> options; var builder = new DbContextOptionsBuilder <RecipeBookContext>(); builder.UseInMemoryDatabase(); options = builder.Options; RecipeBookContext recipeBookContext = new RecipeBookContext(options); recipeBookContext.Database.EnsureDeleted(); recipeBookContext.Database.EnsureCreated(); return(new BookRepository(recipeBookContext)); }
public DishesController(RecipeBookContext context) { db = context; }
public InstructionsController(RecipeBookContext db) { _db = db; }
public ImagesControllerTests() { db = new RecipeBookContext(); controller = new ImagesController(db); }
public VarietiesController(RecipeBookContext context) { _context = context; }
public IngredientsController(RecipeBookContext context) { _context = context; }
public HomeController(RecipeBookContext db) { _db = db; }
public ImagesController(RecipeBookContext context) { db = context; }
public void Setup() { Database.SetInitializer(new RecipeBookInitializer()); context = new RecipeBookContext(); productTypes = new List <ProductType> { new ProductType { Type = "Owoc" }, new ProductType { Type = "Warzywo" }, new ProductType { Type = "Mięso" }, new ProductType { Type = "Ryba" }, new ProductType { Type = "Przyprawa" }, new ProductType { Type = "Nabiał" }, new ProductType { Type = "Produkt suchy" }, new ProductType { Type = "Wędlina" }, new ProductType { Type = "Olej" } }; dishTypes = new List <DishType> { new DishType { Type = "Wegetariańskie" }, new DishType { Type = "Wegańskie" }, new DishType { Type = "Bez glutenowe" }, new DishType { Type = "Pikantne" } }; products = new List <Product> { new Product { Name = "Jajka", ProductType = productTypes[5] }, new Product { Name = "Mąka", ProductType = productTypes[6] }, new Product { Name = "Masło", ProductType = productTypes[5] }, new Product { Name = "Kiełbasa", ProductType = productTypes[7] }, new Product { Name = "Boczek", ProductType = productTypes[2] }, new Product { Name = "Sól", ProductType = productTypes[4] }, new Product { Name = "Pieprz", ProductType = productTypes[4] }, new Product { Name = "Makaron Fusilli", ProductType = productTypes[6] }, new Product { Name = "Pomidor", ProductType = productTypes[1] }, new Product { Name = "Jabłko", ProductType = productTypes[0] }, new Product { Name = "Pieprz Cayenne", ProductType = productTypes[4] }, new Product { Name = "Oliwa", ProductType = productTypes[8] }, new Product { Name = "Parmezan", ProductType = productTypes[5] }, new Product { Name = "Czosnek", ProductType = productTypes[1] } }; recipes = new List <Dish> { new Dish { Name = "Jajecznica", Description = "Smażony mix jajek na maśle z solą i pieprzem.", DishType = dishTypes[0], Products = { products[0], products[2], products[5], products[6] } }, new Dish { Name = "Fusilli aglio e olio", Description = "Makaron typu fusilli z oliwa i czosnkiem. Po wyłożeniu należy posypać tartym parmezanem.", DishType = dishTypes[1], Products = { products[5], products[6], products[7], products[11], products[12], products[13] } } }; }
public SearchController(RecipeBookContext context) { db = context; }
public RecipeBookService(RecipeBookContext recipeBookContext) { _recipeBookContext = recipeBookContext; }
public CategoriesControllerTests() { db = new RecipeBookContext(); controller = new CategoriesController(db); }
public UsersController(RecipeBookContext context, ISigningSymmetricKey signingSymmetricKey) { db = context; this.signingSymmetricKey = signingSymmetricKey; }
public DishesControllerTests() { db = new RecipeBookContext(); controller = new DishesController(db); }
public TagsController(RecipeBookContext db) { _db = db; }
public Home() { InitializeComponent(); this.context = new RecipeBookContext(); }
public IngredientsController(RecipeBookContext db) { _db = db; }
public AmountsController(RecipeBookContext context) { _context = context; }
public RecipesController(UserManager <ApplicationUser> userManager, RecipeBookContext db) { _userManager = userManager; _db = db; }
public IngredientsControllerTests() { db = new RecipeBookContext(); controller = new IngredientsController(db); }
public UsersControllerTests() { db = new RecipeBookContext(); signingSymmetricKey = new SigningSymmetricKey("zigmuntkyzaneusedelka228"); controller = new UsersController(db, signingSymmetricKey); }
public TagService(RecipeBookContext recipeDb) { _recipeDb = recipeDb; }
public CategoriesController(RecipeBookContext db) { _db = db; }
public AccountController(UserManager <ApplicationUser> userManager, SignInManager <ApplicationUser> signInManager, RecipeBookContext db) { _userManager = userManager; _signInManager = signInManager; _db = db; }
public RecipeRepository(RecipeBookContext context) : base(context) { }
public HomeController(ILogger <HomeController> logger, RecipeBookContext context) { _logger = logger; db = context; }
public RecipesController(RecipeBookContext context) { _context = context; }
public CategoriesController(RecipeBookContext context) { db = context; }