public ActionResult Put([FromBody] TaskViewModel vm) { try { var dto = _taskServices.Edit(_mapper.Map <TaskViewModel, TaskDto>(vm)); return(Ok(TasksResult(dto))); } catch (Exception e) { return(BadRequest(e.Message)); } }