public int AddTask(TaskVm taskVm)
        {
            var task = TaskMapper.MapFromVm(taskVm);

            _repo.AddTask(task);
            var idTask = task.IdTask;

            return(idTask);
        }
Exemple #2
0
 public static Task MapFromVm(TaskVm taskVm)
 {
     return(new Task
     {
         IdTask = taskVm.IdTask,
         Name = taskVm.Name,
         Description = taskVm.Description,
         IdPlot = taskVm.IdPlot
     });
 }
        public void EditTask(TaskVm taskVm)
        {
            var task = TaskMapper.MapFromVm(taskVm);

            _repo.EditTask(task);
        }