Beispiel #1
0
        public IActionResult PostCity([FromBody] NewAddressVm addressVm)
        {
            _logger.LogInformation("AddressBookController: PostCity request");

            if (addressVm == null)
            {
                return(StatusCode(StatusCodes.Status400BadRequest));
            }

            Address address = _mapper.Map <Address>(addressVm);

            _addressBookService.AddAddress(address);
            return(Ok());
        }