Пример #1
0
        public IHttpActionResult Put(Guid id, PutTodoRequest request)
        {
            var user = GetCurrentUser();

            var todo = user.Todos.Single(x => x.Id == id);

            todo.IsCompleted = request.IsCompleted;

            _userRepository.Save(user);

            return(Ok());
        }
Пример #2
0
        public IHttpActionResult Put(Guid id, PutTodoRequest request)
        {
            var user = GetCurrentUser();

            var todo = user.Todos.Single(x => x.Id == id);

            todo.IsCompleted = request.IsCompleted;

            _userRepository.Save(user);

            return Ok();
        }