public void AssignToTask(int memberId, int taskId) { var task = _projectDAO.GetTaskById(taskId); if (task.IsApproved) { throw new CheckedException("Cannot assign a completed task"); } _projectDAO.AssignTask(memberId, taskId); }