Esempio n. 1
0
        public int AddTask(TaskVm taskVm)
        {
            var task = TaskMapper.MapFromVm(taskVm);

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

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

            _repo.EditTask(task);
        }