示例#1
0
        public void InsertCountry(InsertCountryInput input)
        {
            //var country = _mapper.Map<Country>(input);
            var country = new Country()
            {
                EnglishName = input.EnglishName,
                ChineseName = input.ChineseName,
            };

            _countryManager.Insert(country);
        }
        public IActionResult PostCountry([FromBody] InsertCountryInput country)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            _countryService.InsertCountry(country);

            //return CreatedAtAction("GetCountry", new { id = country.Id }, country);
            return(Ok());
        }