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