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> DeleteCountryAsync(string code) { NullGuard.NotNullOrWhiteSpace(code, nameof(code)); return(ExecuteAsync(async() => { using CountryModelHandler countryModelHandler = new CountryModelHandler(DbContext, ContactModelConverter.Create()); return await countryModelHandler.DeleteAsync(code); }, MethodBase.GetCurrentMethod())); }
public Task <ICountry> UpdateCountryAsync(ICountry country) { NullGuard.NotNull(country, nameof(country)); return(ExecuteAsync(async() => { using CountryModelHandler countryModelHandler = new CountryModelHandler(DbContext, ContactModelConverter.Create()); return await countryModelHandler.UpdateAsync(country); }, MethodBase.GetCurrentMethod())); }