public async Task <Post> AddPostAsync(Post post) { _db.Entry(post).State = EntityState.Detached; var result = _db.Posts.Add(post); await _db.SaveChangesAsync(); return(result); }
public async Task ChangeCommentAsync(Comment comment) { comment.Modified = DateTime.Now; _db.Entry(comment).State = EntityState.Modified; await _db.SaveChangesAsync(); }
public async Task ChangeTagAsync(Tag tag) { _db.Entry(tag).State = EntityState.Modified; await _db.SaveChangesAsync(); }
public async Task EditPortfolioAsync(Portfolio portfolio) { _db.Entry(portfolio).State = EntityState.Modified; await _db.SaveChangesAsync(); }
public async Task EditUser(ChiefUser chiefUser) { _db.Entry(chiefUser).State = EntityState.Modified; await _db.SaveChangesAsync(); }
public void EditRssAsync(Rss rss) { _db.Entry(rss).State = EntityState.Modified; //await _db.SaveChangesAsync(); }
public async Task EditProjectAsync(Project project) { _db.Entry(project).State = EntityState.Modified; await _db.SaveChangesAsync(); }
public async Task ChangeCategoryAsync(Category category) { _db.Entry(category).State = EntityState.Modified; await _db.SaveChangesAsync(); }