public IHttpActionResult Put(House house) { var houseToUpdate = _houseService.GetById(house.Id); if (houseToUpdate == null) { return NotFound(); } houseToUpdate.Name = house.Name; houseToUpdate.ApiKey = house.ApiKey; _houseService.Update(houseToUpdate); return Ok(houseToUpdate); }
public IHttpActionResult Post(House house) { return Ok(_houseService.Add(house)); }