Пример #1
0
        public IHttpActionResult AddTask(TaskModel taskModel)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }
            var data = taskBL.CreateTask(taskModel);

            if (data == true)
            {
                return(Ok(taskModel));
            }
            return(BadRequest());
        }