public IHttpActionResult Put(Accessory accessory) { var accessoryToUpdate = _accessoryService.GetById(accessory.Id); if (accessoryToUpdate == null) { return NotFound(); } accessoryToUpdate.Status = accessory.Status; _accessoryService.Update(accessoryToUpdate); return Ok(accessoryToUpdate); }
public IHttpActionResult Post(Accessory accessory) { return Ok(_accessoryService.Add(accessory)); }