public async Task <dynamic> GetImage(string imageId) { string userId = Request.Query .SingleOrDefault(q => string.Compare(q.Key, "userId", StringComparison.OrdinalIgnoreCase) == 0) .Value; try { return(await _crudService.GetImageAsync(userId, imageId)); } catch (Exception e) { _logger.LogError("Get Image Failed " + e); return(BadRequest(e.Message)); } }