//Helper private ProjectTask TryGet(int id) { ProjectTask task = (ProjectTask)_repository.Get(id); if (task == null) { throw new Exception($"No task found with id {id} in the current dataBase"); } return(task); }
public void RemoveTask(int id) { ProjectTask task = TryGet(id); _repository.Delete(task); }