private void Remove(ProductToSupplyModel model)
 {
     _dbContext.ProductsToSupplies.Remove(model);
     _dbContext.SaveChanges();
     _dbContext.Entry(_supply).Reload();
     FillData();
 }
        public AddProductViewModel(AppDbContext dbContext, SupplyModel supply)
        {
            _dbContext = dbContext;

            Products = _dbContext.Products.ToList();
            Model    = new ProductToSupplyModel
            {
                SupplyId = supply.SupplyId
            };
        }