public Task <IEnumerable <ICountry> > GetCountriesAsync() { return(ExecuteAsync(async() => { using CountryModelHandler countryModelHandler = new CountryModelHandler(DbContext, ContactModelConverter.Create()); return await countryModelHandler.ReadAsync(); }, MethodBase.GetCurrentMethod())); }
public Task <ICountry> GetCountryAsync(string code) { NullGuard.NotNullOrWhiteSpace(code, nameof(code)); return(ExecuteAsync(async() => { using CountryModelHandler countryModelHandler = new CountryModelHandler(DbContext, ContactModelConverter.Create()); return await countryModelHandler.ReadAsync(code); }, MethodBase.GetCurrentMethod())); }