public void AddTask(int userStoryId, string taskTitle) { var userStory = _projectDAO.GetUserStoryById(userStoryId); if (userStory.State == UserStoryState.RESOLVED) { throw new CheckedException("Cannot add task to a resolved user story."); } var task = new Task() { Title = taskTitle, IsDone = false, IsApproved = false }; _projectDAO.AddTask(userStoryId, task); }