public async Task <IList <MetaDataModel> > GetAllAsync(string requestId = "") { _logger.LogInformation($"RequestId: {requestId} - MetaDataSvc_GetAllAsync called."); try { var listItems = (await _metaDataRepository.GetAllAsync(requestId)).Select(x => MapToModel(x)).ToList(); Guard.Against.Null(listItems, nameof(listItems), requestId); return(listItems); } catch (Exception ex) { _logger.LogError($"RequestId: {requestId} - MetaDataSvc_GetAllAsync error: " + ex); throw; } }
/// <summary> /// Get all metadata /// </summary> /// <returns>List of metadata</returns> public Task <IEnumerable <MetaData> > GetMetaDataAsync() { return(_metaDataRepository.GetAllAsync()); }