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