예제 #1
0
        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;
            }));
        }
예제 #2
0
        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;
            }));
        }
예제 #3
0
        public HttpResponseMessage UpdateIfrsEquityUnqouted(HttpRequestMessage request, [FromBody] IfrsEquityUnqouted ifrsEquityUnqoutedModel)
        {
            return(GetHttpResponse(request, () =>
            {
                var ifrsEquityUnqouted = _IFRS9Service.UpdateIfrsEquityUnqouted(ifrsEquityUnqoutedModel);

                return request.CreateResponse <IfrsEquityUnqouted>(HttpStatusCode.OK, ifrsEquityUnqouted);
            }));
        }