// GET: api/InsurancePolicy/5 public IHttpActionResult Get(int id) { try { InsurancePolicyBusiness business = new InsurancePolicyBusiness(); return(this.Content(HttpStatusCode.OK, business.Get(id))); } catch (System.Exception) { throw; } }
// PUT: api/InsurancePolicy/5 public IHttpActionResult Put(int id, [FromBody] Policy policy) { try { InsurancePolicyBusiness business = new InsurancePolicyBusiness(); business.Update(policy); return(this.Content(HttpStatusCode.OK, policy)); } catch (System.Exception) { throw; } }