public HttpResponseMessage GetIfrsEquityUnqouted(HttpRequestMessage request, int ifrsEquityUnqoutedId) { return(GetHttpResponse(request, () => { HttpResponseMessage response = null; IfrsEquityUnqouted ifrsEquityUnqouted = _IFRS9Service.GetIfrsEquityUnqouted(ifrsEquityUnqoutedId); // notice no need to create a seperate model object since IfrsEquityUnqouted entity will do just fine response = request.CreateResponse <IfrsEquityUnqouted>(HttpStatusCode.OK, ifrsEquityUnqouted); return response; })); }
public HttpResponseMessage DeleteIfrsEquityUnqouted(HttpRequestMessage request, [FromBody] int ifrsEquityUnqoutedId) { return(GetHttpResponse(request, () => { HttpResponseMessage response = null; // not that calling the WCF service here will authenticate access to the data IfrsEquityUnqouted ifrsEquityUnqouted = _IFRS9Service.GetIfrsEquityUnqouted(ifrsEquityUnqoutedId); if (ifrsEquityUnqouted != null) { _IFRS9Service.DeleteIfrsEquityUnqouted(ifrsEquityUnqoutedId); response = request.CreateResponse(HttpStatusCode.OK); } else { response = request.CreateErrorResponse(HttpStatusCode.NotFound, "No ifrsEquityUnqouted found under that ID."); } return response; })); }
public HttpResponseMessage UpdateIfrsEquityUnqouted(HttpRequestMessage request, [FromBody] IfrsEquityUnqouted ifrsEquityUnqoutedModel) { return(GetHttpResponse(request, () => { var ifrsEquityUnqouted = _IFRS9Service.UpdateIfrsEquityUnqouted(ifrsEquityUnqoutedModel); return request.CreateResponse <IfrsEquityUnqouted>(HttpStatusCode.OK, ifrsEquityUnqouted); })); }