Esempio n. 1
0
        //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);
        }
Esempio n. 2
0
        public void RemoveTask(int id)
        {
            ProjectTask task = TryGet(id);

            _repository.Delete(task);
        }