Пример #1
0
        public IActionResult Put(Guid id, [FromBody] Models.User user)
        {
            if (!ModelState.IsValid)
            {
                return(new BadRequestResult());
            }

            try
            {
                user.Id = id;
                _userInteractor.UpdateUser(Models.User.MapToEntity(user));
                return(new OkResult());
            }
            catch (EntityNotFoundException)
            {
                return(new NotFoundResult());
            }
        }