Ejemplo n.º 1
0
        public async Task <ActionResult <AddressDTO> > CreateProduct(AddressDTO ad2)
        {
            var ad1 = ad2.toAddress();

            _context.addresses.Add(ad1);
            await _context.SaveChangesAsync();

            return(CreatedAtAction(nameof(Getaddress), new { id = ad1.id }, ad1));
        }