public ActionResult <DebugReport> GetReport() { return(new DebugReport { geographicCount = _geographicDataService.Count(), nationalCharacteristicCount = _nationalCharacteristicDataService.Count(), laCharacteristicCount = _laCharacteristicDataService.Count() }); }
public int Count(DataCsvFilename filename, Guid publicationId, int releaseId) { var entityType = filename.GetEntityTypeFromDataFileAttributeOfEnumType(filename.GetType()); if (entityType == typeof(GeographicData)) { return(_geographicDataService.Count(data => data.PublicationId == publicationId && data.ReleaseId == releaseId)); } if (entityType == typeof(CharacteristicDataLa)) { return(_laCharacteristicDataService.Count(data => data.PublicationId == publicationId && data.ReleaseId == releaseId)); } if (entityType == typeof(CharacteristicDataNational)) { return(_nationalCharacteristicDataService.Count(data => data.PublicationId == publicationId && data.ReleaseId == releaseId)); } throw new ArgumentOutOfRangeException(nameof(filename), filename, null); }