protected override object Process(TaskUndo input)
        {
            Task entity = _autoMapperService.MapTaskUndoModel(input);

            _taskService.Create(entity);

            return(_autoMapperService.MapTaskEntityToInfoModel(entity));
        }
Esempio n. 2
0
        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));
        }