/// <inheritdoc/> public IMapsDirectlyToDatabaseTable GetObjectByID <T>(int value) where T : IMapsDirectlyToDatabaseTable { if (CatalogueRepository.SupportsObjectType(typeof(T))) { return(CatalogueRepository.GetObjectByID <T>(value)); } if (DataExportRepository.SupportsObjectType(typeof(T))) { return(DataExportRepository.GetObjectByID <T>(value)); } else { throw new ArgumentException("Did not know what repository to use to fetch objects of Type '" + typeof(T) + "'"); } }
/// <inheritdoc/> public IMapsDirectlyToDatabaseTable GetObjectByID(Type t, int value) { if (CatalogueRepository.SupportsObjectType(t)) { return(CatalogueRepository.GetObjectByID(t, value)); } if (DataExportRepository.SupportsObjectType(t)) { return(DataExportRepository.GetObjectByID(t, value)); } else { throw new ArgumentException("Did not know what repository to use to fetch objects of Type '" + t + "'"); } }