Exemple #1
0
 public IActionResult DeleteAddress(long id)
 {
     using (AddressEngine engine = new AddressEngine(this._context))
         return(Ok(engine.DeleteAddress(id)));
 }
Exemple #2
0
 public async Task PostAddress(Address address)
 {
     using (AddressEngine engine = new AddressEngine(this._context))
         await engine.CreateAddress(address);
 }
Exemple #3
0
 public async Task <ActionResult <Address> > GetAddress(long id)
 {
     using (AddressEngine engine = new AddressEngine(this._context))
         return(Ok(await engine.GetAddress(id)));
 }
Exemple #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)));
 }
Exemple #5
0
 public async Task <ActionResult <IEnumerable <Address> > > GetAddress()
 {
     using (AddressEngine engine = new AddressEngine(this._context))
         return(Ok(await engine.GetAllAddresses()));
 }