Пример #1
0
 public void Delete(Product p)
 {
     _dbContext.Products.Remove(p);
 }
Пример #2
0
 public void Save(Product product)
 {
     _dbContext.Products.Add(product);
 }
Пример #3
0
 public void Update(Product product)
 {
     var existing = Products.First(x => x.Id == product.Id);
     existing.InternalCode = product.InternalCode;
     existing.Name = product.Name;
     existing.PosId = product.PosId;
     existing.Price = product.Price;
     existing.StatusId = product.StatusId;
     existing.Uid = product.Uid;
     existing.UserId = product.UserId;
 }