public IActionResult DeleteAddress(long id) { using (AddressEngine engine = new AddressEngine(this._context)) return(Ok(engine.DeleteAddress(id))); }
public async Task PostAddress(Address address) { using (AddressEngine engine = new AddressEngine(this._context)) await engine.CreateAddress(address); }
public async Task <ActionResult <Address> > GetAddress(long id) { using (AddressEngine engine = new AddressEngine(this._context)) return(Ok(await engine.GetAddress(id))); }
public async Task <ActionResult <Address> > PutAddress(long id, Address address) { using (AddressEngine engine = new AddressEngine(this._context)) return(Ok(await engine.UpdateAddress(id, address))); }
public async Task <ActionResult <IEnumerable <Address> > > GetAddress() { using (AddressEngine engine = new AddressEngine(this._context)) return(Ok(await engine.GetAllAddresses())); }