Exemple #1
0
        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();
        }
Exemple #3
0
 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();
 }
Exemple #6
0
 public void EditRssAsync(Rss rss)
 {
     _db.Entry(rss).State = EntityState.Modified;
     //await _db.SaveChangesAsync();
 }
Exemple #7
0
 public async Task EditProjectAsync(Project project)
 {
     _db.Entry(project).State = EntityState.Modified;
     await _db.SaveChangesAsync();
 }
Exemple #8
0
 public async Task ChangeCategoryAsync(Category category)
 {
     _db.Entry(category).State = EntityState.Modified;
     await _db.SaveChangesAsync();
 }