public async Task <long> UpdateComment(CommentDBEntities comment) { _context.Entry(comment).State = EntityState.Modified; var result = await _context.SaveChangesAsync(); return(await Task.FromResult(result)); }
public async Task <long> SaveComment(CommentDBEntities comment) { await this.Entities.AddAsync(comment); return(await _context.SaveChangesAsync()); }