public ComputerController(ComputerShopContext context, IApiClient apiClient, IWebHostEnvironment webHostEnvironment) { _context = context; _apiClient = apiClient; _webHostEnvironment = webHostEnvironment; }
public HomeController(ILogger <HomeController> logger, ComputerShopContext dbContext) { _logger = logger; _context = dbContext; //_context.Descriptions.Add(new Domain.Entities.Description() //{ // Name = "TestDescription", // Value = "test", // KitID = Guid.Empty //}); //_context.Kits.Add(new Domain.Entities.Kit() //{ // ImageLink = " ", // Price = 3m, // Descriptions = new List<Domain.Entities.Description>() // { // new Domain.Entities.Description() // { // Name = "TestDescription", // Value = "test", // KitID = Guid.Empty // } // } //}); //_context.SaveChanges(); }
private void ExecuteLoadMainWindow() { try { using (ComputerShopContext computerShopContext = new ComputerShopContext()) { CustomerRepository = new CustomerRepository(computerShopContext); Customer customer = CustomerRepository.FindByPredicate(cust => cust.Login == Login).FirstOrDefault(); if (customer != null) { if (Password != null && CustomerRepository.HashEquals(Password, customer.Password)) { MainWindow mainWindow = new MainWindow(customer); mainWindow.Show(); View.Close(); } else { MessageBox.Show("Введен неверный пароль"); } } else { MessageBox.Show("Неверно введен логин"); } } } catch (Exception e) { MessageBox.Show($"{e}\t{e.Message}"); } }
public OrderController(ComputerShopContext context, UserManager <User> userManager, SignInManager <User> signInManager, IHttpContextAccessor httpContextAccessor) { _context = context; _userManager = userManager; _signInManager = signInManager; _httpContextAccessor = httpContextAccessor; }
public AssemblyService(ComputerShopContext context) { categoryRepo = new CategoryRepository(context); productRepo = new ProductRepository(context); assemblyRepo = new AssemblyRepository(context); featureRepo = new FeatureRepository(context); featuresForCategoryRepo = new FeaturesForCategoryRepository(context); featureValueRepo = new FeatureValueRepository(context); userRepo = new UserRepository(context); }
public ShopService(ComputerShopContext context) { productRepo = new ProductRepository(context); categoryRepo = new CategoryRepository(context); basketRepo = new BasketRepository(context); userRepo = new UserRepository(context); basketItemRepo = new BasketItemRepository(context); orderRepo = new OrderRepository(context); addressRepo = new AddressRepository(context); }
public AdminService(ComputerShopContext context) { groupRepo = new GroupRepository(context); categoryRepo = new CategoryRepository(context); producentRepo = new ProducentRepository(context); featureRepo = new FeatureRepository(context); featureValueRepo = new FeatureValueRepository(context); featureForCategoryRepo = new FeaturesForCategoryRepository(context); productRepo = new ProductRepository(context); featureValueRepo = new FeatureValueRepository(context); userRepo = new UserRepository(context); featureValueForProductRepo = new FeatureValueForProductRepository(context); }
public PartialViewResult Edit(ApplicationUser ApplicationUser) { if (ModelState.IsValid) { ComputerShopContext db = new ComputerShopContext(); ApplicationDbContext App = new ApplicationDbContext(); var user = App.Users.Find(ApplicationUser.Id); user.Name = ApplicationUser.Name; user.Surname = ApplicationUser.Surname; user.Address = ApplicationUser.Address; user.Email = ApplicationUser.Email; user.Telephone = ApplicationUser.Telephone; App.Entry(user).State = EntityState.Modified; App.SaveChanges(); return(PartialView("~/Views/Manage/Index.cshtml", user)); } return(PartialView()); }
public CategoriesController(ComputerShopContext context) { _context = context; }
public RecommendationController(ComputerShopContext context) { _context = context; }
public ProducentRepository(ComputerShopContext context) { this.context = context; }
public AbstractRepository() { ComputerShopContext = new ComputerShopContext(); }
public AbstractRepository(ComputerShopContext computerShopContext) { ComputerShopContext = computerShopContext; }
public OrderItemsController(ComputerShopContext context) { _context = context; }
public DeliveredToWareHouseRepository(ComputerShopContext context) : base(context) { }
public CategoryRepository(ComputerShopContext context) { this.context = context; }
public AddressRepository(ComputerShopContext context) { this.context = context; }
public SupplyRepository(ComputerShopContext context) : base(context) { }
public ProductsController(ShopService shopService, AdminService adminService, ComputerShopContext context) { this.shopService = new ShopService(context); this.adminService = new AdminService(context); }
protected ComputerShopController() { ComputerShopContext = new ComputerShopContext(); ContextProvider = new EFContextProvider<ComputerShopContext>(); }
public GroupRepository(ComputerShopContext context) { this.context = context; }
public FeatureValueRepository(ComputerShopContext context) { this.context = context; }
public ProductRepository(ComputerShopContext context) : base(context) { }
public CustomerKitsController(ComputerShopContext context) { _context = context; }
public NavbarDropdownViewComponent(ComputerShopContext context) { _context = context; }
public BasketRepository(ComputerShopContext context) { this.context = context; }
public OrderedRepository(ComputerShopContext context) : base(context) { }
public CustomerRepository(ComputerShopContext context) : base(context) { }
public InvoicesController(ComputerShopContext context) { _context = context; }
public KitsController(ComputerShopContext context) { _context = context; }
public OrderRepository(ComputerShopContext context) { this.context = context; }