public async Task <IHttpActionResult> PutTodo(int id, int todoId, TodoResourceModel input)
        {
            var todo = Mapper.Map <Todo>(input);

            todo.Id = todoId;
            await _todoListAppService.UpdateTodoAsync(id, todo);

            return(Ok(string.Empty));
        }
示例#2
0
        public async Task <IHttpActionResult> PutTodo(int id, int todoId, TodoResourceModel input)
        {
            var todoListDesc = new EntityDescriptor(id, GetETag());
            var todo         = Mapper.Map <Todo>(input);

            todo.Id = todoId;
            var ret = await _todoListAppService.UpdateTodoAsync(todoListDesc, todo);

            return(ETagOk(ret.EntityVersion, string.Empty));
        }