public async Task <IActionResult> ReadImageAsync(int id, [FromQuery] string fields) { if (!string.IsNullOrWhiteSpace(fields) && !PropertyManager.PropertiesExists <Domain.Models.UserImage>(fields)) { return(BadRequest()); } var image = await _userImageService.GetByUserIdAsync(id, true); var imageDto = _mapper.Map <UserImageDto>(image); return(Ok(imageDto.ShapeData(fields))); }