public void UpdateContentAndPlusyAndEditDate(Comment comment) { _db.Comments.Attach(comment); _db.Entry(comment).Property("Content").IsModified = true; _db.Entry(comment).Property("Votes").IsModified = true; _db.Entry(comment).Property("EditingDate").IsModified = true; }
public void UpdateContentUpvotesAddDate(Post post) { _db.Post.Attach(post); _db.Entry(post).Property("Content").IsModified = true; _db.Entry(post).Property("Votes").IsModified = true; _db.Entry(post).Property("EditingDate").IsModified = true; }
public void Update(T item) { _database.Entry(item).State = EntityState.Modified; _database.SaveChanges(); }