Exemplo n.º 1
0
        public TodoListDTO Add(TodoListDTO todoListDTO)
        {
            var todoList = _todoListMapper.MapperToEntity(todoListDTO);

            todoList.SetCategory(_categoryService.Get(todoList.Category.Id));
            return(_todoListMapper.MapperToDTO(_todoListService.Add(todoList)));
        }
Exemplo n.º 2
0
 public Task MapperToEntity(TaskDTO taskDTO) => new Task(taskDTO.Id, taskDTO.Name, taskDTO.Done, _todoListMapper.MapperToEntity(taskDTO.TodoList), _userMapper.MapperToEntity(taskDTO.User));