public void Delete(int commentId) { var comment = _sportWorldContext.Comment.First(c => c.ID == commentId); _sportWorldContext.Comment.Remove(comment); _sportWorldContext.SaveChanges(); }
public void AddUser(string id, string name, Gender gender) { _context.User.Add(new User { ID = id, Name = name, Gender = gender }); _context.SaveChanges(); }
public void UpdateStore(Store storeToUpdate) { _sportWorldContext.Store.Update(storeToUpdate); _sportWorldContext.SaveChanges(); }
public void SaveProducts(IEnumerable <Product> products) { _SportWorldContext.Product.AddRange(products); _SportWorldContext.SaveChanges(); }
public void AddUser(User user) { _sportWorldContext.User.Add(user); _sportWorldContext.SaveChanges(); }