Ejemplo n.º 1
0
        public IActionResult AddTask([FromBody] TaskForCreationDTO taskFromRequest)
        {
            if (taskFromRequest == null)
            {
                return(BadRequest());
            }
            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }

            _repo.AddTask(ModelsMapping.GetTaskEntity(taskFromRequest));
            return(Ok());
        }