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