public ReceiptNoteRepository(EShopContext context) : base(context) { }
public CustomersController(EShopContext context) { _context = context; }
public CategoryRepository(EShopContext EShopContext) : base(EShopContext) { }
public SupplierRepository(EShopContext context) : base(context) { }
public static void EnsureSeedDataForProducts(this EShopContext context) { if (context.Products.Any()) { return; } var products = new List <Product> { new Product { ImageUri = "http://icons.iconarchive.com/icons/mdgraphs/iphone-4g/512/iPhone-4G-shadow-icon.png", Price = 1399.99M, Label = "iPhone X - Apple", Available = true }, new Product { ImageUri = "http://icons.iconarchive.com/icons/dailyoverview/tv/256/television-06-icon.png", Price = 999.99M, Label = "Samsung Smart TV", Available = true }, new Product { Price = 399.99M, ImageUri = "http://icons.iconarchive.com/icons/dapino/summer-blue/512/Fan-icon.png", Label = "XXX Fan", Available = true }, new Product { Price = 1399.99M, Label = "Magic wand", ImageUri = "http://icons.iconarchive.com/icons/custom-icon-design/flatastic-6/512/Magic-wand-icon.png", Available = false }, new Product { Price = 14.99M, Label = "Funky Soccer Ball", ImageUri = "http://icons.iconarchive.com/icons/martin-berube/sport/256/Soccer-icon.png", Available = true }, new Product { Price = 4.99M, Label = "Teddy bear", ImageUri = "http://icons.iconarchive.com/icons/custom-icon-design/flatastic-10/512/Bear-icon.png", Available = true }, new Product { Price = 123.78M, Label = "Classic Watch", ImageUri = "http://icons.iconarchive.com/icons/r34n1m4ted/chanel/512/WATCH-icon.png", Available = true }, new Product { Price = 4.99M, Label = "Walking with dinosaurs DVD", ImageUri = "http://icons.iconarchive.com/icons/firstline1/movie-mega-pack-5/512/Walking-with-Dinosaurs-icon.png", Available = true }, new Product { Price = 12.99M, Label = "ADATA USB Stick 128 GB", ImageUri = "http://icons.iconarchive.com/icons/jonathan-rey/device/256/Kingston-DataTraveler-USB-Stick-icon.png", Available = true }, new Product { Price = 1.99M, Label = "ICONIX MICRO SD 16 GB", ImageUri = "http://icons.iconarchive.com/icons/dakirby309/simply-styled/128/Micro-SD-Card-icon.png", Available = true } }; context.Products.AddRange(products); context.SaveChanges(); }
public static void Initialize(this EShopContext context) { //// first, clear the database. This ensures we can always start //// fresh with each demo. Not advised for production environments, obviously :-) //context.Cities.RemoveRange(context.Cities); //context.SaveChanges(); context.Database.EnsureCreated(); // Look for any students. if (context.Products.Any()) { return; // DB has been seeded } // init seed data var categories = new List <Category>() { new Category() { CategoryId = 1, CategoryName = "Eletronics", Description = "Eletronics in general" }, new Category() { CategoryId = 2, CategoryName = "Home", Description = "Home in general" } }; var products = new List <Product>() { new Product() { ProductId = 1, ProductName = "Celular TOP 1", Description = "great celaular", ProductCode = "cel01", Price = 10000, ReleaseDate = new DateTime(2020, 09, 22), Category = new Category { CategoryId = 1, CategoryName = "Eletronics", Description = "Eletronics in general" } }, new Product() { ProductId = 2, ProductName = "TV 4K 1", Description = "great TV", ProductCode = "tv01", Price = 5000, ReleaseDate = new DateTime(2020, 09, 22), Category = new Category { CategoryId = 1, CategoryName = "Eletronics", Description = "Eletronics in general" } } }; context.Products.AddRange(products); context.SaveChanges(); }
public InputRepository(EShopContext context) : base(context) { }
public PurshaseRepository(EShopContext dbContext) { _dbContext = dbContext; }
public UnitOfWork() { this.context = new EShopContext(); }
public ProductRepository(EShopContext dbContext) { _dbContext = dbContext; }
public ItemAssetService(EShopContext context) { _context = context; }
public PackRepository(EShopContext context) : base(context) { }
public CategoryRepository(EShopContext context) { this._context = context; }
public PermissionRepository(EShopContext context) : base(context) { }
public UserRepository(EShopContext dbContext) { _dbContext = dbContext; }
public UnitOfWork(EShopContext context) { this.context = context; }
public HomeController(EShopContext context) { _context = context; }
public ItemsController(EShopContext context) { _context = context; }
public ProductRepository(EShopContext context) { this._context = context; }
public CategoriesController(EShopContext context) { _context = context; }
public CountryRepository(EShopContext EShopContext) : base(EShopContext) { }
public InventoryRepository(EShopContext EShopContext) : base(EShopContext) { }
public static void EnsureSeedDataForOrders(this EShopContext context) { if (context.Orders.Any()) { return; } var orders = new List <Order> { new Order { CustomerId = 1, Customer = null, DeliveryAddress = "3 Forest Dale Way", OrderDetails = new List <OrderDetail> { new OrderDetail { ProductId = 1, Quantity = 2, }, new OrderDetail { ProductId = 3, Quantity = 1 } } }, new Order { CustomerId = 1, Customer = null, DeliveryAddress = "14 Center Court", OrderDetails = new List <OrderDetail> { new OrderDetail { ProductId = 1, Quantity = 2, } } }, new Order { CustomerId = 5, Customer = null, DeliveryAddress = "8 Northfield Terrace", OrderDetails = new List <OrderDetail> { new OrderDetail { ProductId = 1, Quantity = 3, }, new OrderDetail { ProductId = 10, Quantity = 1 }, new OrderDetail { ProductId = 4, Quantity = 1 } } }, new Order { CustomerId = 6, Customer = null, DeliveryAddress = "9 Buhler Alley", OrderDetails = new List <OrderDetail> { new OrderDetail { ProductId = 7, Quantity = 1, }, new OrderDetail { ProductId = 3, Quantity = 1 }, new OrderDetail { ProductId = 5, Quantity = 1, }, new OrderDetail { ProductId = 8, Quantity = 1 } } }, new Order { CustomerId = 4, Customer = null, DeliveryAddress = "9151 Becker Circle", OrderDetails = new List <OrderDetail> { new OrderDetail { ProductId = 1, Quantity = 1, }, new OrderDetail { ProductId = 4, Quantity = 1 } } }, new Order { CustomerId = 4, Customer = null, DeliveryAddress = "90640 5th Alley", OrderDetails = new List <OrderDetail> { new OrderDetail { ProductId = 8, Quantity = 1, }, new OrderDetail { ProductId = 6, Quantity = 1 } } }, new Order { CustomerId = 3, Customer = null, DeliveryAddress = "10869 Arizona Street", OrderDetails = new List <OrderDetail> { new OrderDetail { ProductId = 1, Quantity = 1, }, new OrderDetail { ProductId = 2, Quantity = 1, }, new OrderDetail { ProductId = 9, Quantity = 1 } } }, }; context.Orders.AddRange(orders); context.SaveChanges(); }
public WareHouseRepository(EShopContext context) : base(context) { }
public CatalogItemsController(EShopContext dbContext) { _dbContext = dbContext; }
public CarrierRepository(EShopContext context) : base(context) { }
public OrderRepository(EShopContext context) { this._context = context; }
public InventoryCheckpointRepository(EShopContext context) : base(context) { }
public LanguageRepository(EShopContext context) : base(context) { }
public OperationRepository(EShopContext context) : base(context) { }