Beispiel #1
0
 public async Task DeleteCountry(long Id)
 {
     try
     {
         await Task.Run(() => ManageCountry.DeleteCountry(Id));
     }
     catch (Exception)
     {
         throw;
     }
 }
Beispiel #2
0
        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;
            }
        }
Beispiel #3
0
        public async Task <CountryCreateModel> UpdateCountry(CountryCreateModel data)
        {
            try
            {
                tblCountry dataCountry = await Task.Run(() => ManageCountry.UpdateCountry(data.ConvertTotblCountry()));

                return(dataCountry.ConvertToCountry());
            }
            catch (Exception)
            {
                throw;
            }
        }
Beispiel #4
0
        public async Task <CountryCreateModel> GetCountry(long Id)
        {
            try
            {
                tblCountry dataCountry = await Task.Run(() => ManageCountry.GetCountry(Id));

                return(dataCountry.ConvertToCountry());
            }
            catch (Exception)
            {
                throw;
            }
        }