Exemplo n.º 1
0
 public bool EditOwner(Owner owner)
 {
     this.ownerRepository.Update(owner);
     this.ownerRepository.SaveChanges();
     return true;
 }
Exemplo n.º 2
0
 // PUT: api/Owners/5
 public IHttpActionResult Put(Owner owner)
 {
     bool result = this.ownersService.EditOwner(owner);
     return Ok(result);
 }
Exemplo n.º 3
0
 public bool CreateOwner(Owner owner)
 {
     this.ownerRepository.Add(owner);
     this.ownerRepository.SaveChanges();
     return true;
 }
Exemplo n.º 4
0
 // POST: api/Owners
 public IHttpActionResult Post(Owner owner)
 {
     bool result = this.ownersService.CreateOwner(owner);
     return Ok(result);
 }