protected override object Process(TaskUndo input) { Task entity = _autoMapperService.MapTaskUndoModel(input); _taskService.Create(entity); return(_autoMapperService.MapTaskEntityToInfoModel(entity)); }
public JsonResult CreateTask(string taskTitle) { var task = new Task { UserId = UserId, Title = taskTitle, State = TaskState.NewTask }; _taskService.Create(task); var newTask = _autoMapperService.MapTaskEntityToInfoModel(task); return(Json(newTask, JsonRequestBehavior.AllowGet)); }