示例#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;
 }