示例#1
0
        public async Task <CountryModel> AddCountry(CountryModel country)
        {
            country.Validate();
            var getcountry = await _contryRepo.GetCountry(country.CountryId);

            if (getcountry.CountryId != 0)
            {
                return(await _contryRepo.UpdateCountry(country));
            }
            else
            {
                return(await _contryRepo.AddCountry(country));
            }
        }