public void DeleteCommentRatings(int commentId) { var commentRatings = _context.CommentsRatings.Where(cr => cr.CommentId == commentId).ToList(); _context.CommentsRatings.RemoveRange(commentRatings); _context.SaveChanges(); }
public void AddCommentToConspect(Data.Entities.Comment comment) { _context.Comments.Add(comment); _context.SaveChanges(); }
public void Insert(ConspectCategory item) { _context.ConspectsCategories.Add(item); _context.SaveChanges(); }
public void InsertCommentRating(CommentRating commentRating) { _context.CommentsRatings.Add(commentRating); _context.SaveChanges(); }
public int UploadConspect(Conspect item) { _context.Conspects.Add(item); _context.SaveChanges(); return item.Id; }
public void AddUser(User user) { _context.Add(user); _context.SaveChanges(); }