Exemple #1
0
        public async Task <IActionResult> GetById([FromRoute][ValidateGuid] string profileId)
        {
            var profile = await _profilesService.GetByIdAsync(profileId);

            if (profile == null)
            {
                var error = new ApiError("Profile with such Id was not found.", HttpStatusCode.NotFound);
                return(NotFound(error));
            }

            return(Ok(profile));
        }