public async Task DeleteCountry(long Id) { try { await Task.Run(() => ManageCountry.DeleteCountry(Id)); } catch (Exception) { throw; } }
public async Task <List <CountryCreateModel> > GetAllCountries() { try { List <tblCountry> dataCountry = await Task.Run(() => ManageCountry.GetAllCountries()); return(dataCountry.Select(a => a.ConvertToCountry()).ToList()); } catch (Exception) { throw; } }
public async Task <CountryCreateModel> UpdateCountry(CountryCreateModel data) { try { tblCountry dataCountry = await Task.Run(() => ManageCountry.UpdateCountry(data.ConvertTotblCountry())); return(dataCountry.ConvertToCountry()); } catch (Exception) { throw; } }
public async Task <CountryCreateModel> GetCountry(long Id) { try { tblCountry dataCountry = await Task.Run(() => ManageCountry.GetCountry(Id)); return(dataCountry.ConvertToCountry()); } catch (Exception) { throw; } }