public async Task <int> RemoveUserFromTeam(User user) { user.TeamId = null; _dbLogService.LogOnEntityDelete(user); return(await _context.SaveChangesAsync()); }
public async Task <int> RemoveUserFromTaskAsync(Tasks task, TaskStatus status) { task.UserId = null; task.Status = status; _dbLogService.LogOnEntityDelete(task); return(await _context.SaveChangesAsync()); }
public async Task <int> RemoveCommentAsync(int commentId) { var commentToRemove = await _context.Comments .SingleOrDefaultAsync(c => c.Id == commentId); _dbLogService.LogOnEntityDelete(commentToRemove); _context.Comments.Remove(commentToRemove); return(await _context.SaveChangesAsync()); }