public TaskDetailDto AddTask(TaskDetailCreateDto dto)
        {
            var entity = AutoMapper.Mapper.Map <Task>(dto);

            var newTask = _taskRepository.Add(entity);

            return(AutoMapper.Mapper.Map <TaskDetailDto>(newTask));
        }
        public IHttpActionResult CreateTask(TaskDetailCreateDto dto)
        {
            if (dto == null)
            {
                return(BadRequest("Test"));
            }


            return(Ok(_taskService.AddTask(dto)));
        }