public async Task <DomainModel.FhirVersion?> GetAsync(Common.Enums.FhirVersion fhirMajorVersion) { byte[]? data = await IDistributedCache.GetAsync($"{ParameterName}{fhirMajorVersion.GetCode()}"); if (data is object) { return(JsonSerializer.Deserialize <DomainModel.FhirVersion>(data)); } else { DomainModel.FhirVersion?FhirVersion = await IFhirVersionRepository.GetByVersionAsycn(fhirMajorVersion); if (FhirVersion is object) { await this.SetAsync(FhirVersion); return(FhirVersion); } return(null); } }
public async Task RemoveAsync(Common.Enums.FhirVersion fhirMajorVersion) { await IDistributedCache.RemoveAsync($"{ParameterName}{fhirMajorVersion.GetCode()}"); }