public TodoListDTO Add(TodoListDTO todoListDTO) { var todoList = _todoListMapper.MapperToEntity(todoListDTO); todoList.SetCategory(_categoryService.Get(todoList.Category.Id)); return(_todoListMapper.MapperToDTO(_todoListService.Add(todoList))); }
public Task MapperToEntity(TaskDTO taskDTO) => new Task(taskDTO.Id, taskDTO.Name, taskDTO.Done, _todoListMapper.MapperToEntity(taskDTO.TodoList), _userMapper.MapperToEntity(taskDTO.User));