public void Delete(Product p) { _dbContext.Products.Remove(p); }
public void Save(Product product) { _dbContext.Products.Add(product); }
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; }