public ActionResult <SecondaryCustomerShipToAddress> PutSecondaryCustomerShipToAddress(long id, SecondaryCustomerShipToAddress secondaryCustomerShipToAddress) { if (id != secondaryCustomerShipToAddress.Id) { return(BadRequest()); } _context.Entry(secondaryCustomerShipToAddress).State = EntityState.Modified; try { _context.SaveChanges(); } catch (DbUpdateConcurrencyException) { if (!SecondaryCustomerShipToAddressExists(id)) { return(NotFound()); } else { throw; } } return(secondaryCustomerShipToAddress); }
public ActionResult <SecondaryCustomerShipToAddress> PostSecondaryCustomerShipToAddress(SecondaryCustomerShipToAddress secondaryCustomerShipToAddress) { _context.SecondaryCustomerShipToAddress.Add(secondaryCustomerShipToAddress); _context.SaveChanges(); return(CreatedAtAction("GetSecondaryCustomerShipToAddress", new { id = secondaryCustomerShipToAddress.Id }, secondaryCustomerShipToAddress)); }