public HttpResponseMessage UpdateMemoProductMap(HttpRequestMessage request, [FromBody] MemoProductMap memoproductmapsModel) { return(GetHttpResponse(request, () => { var memoproductmaps = _MPRCoreService.UpdateMemoProductMap(memoproductmapsModel); return request.CreateResponse <MemoProductMap>(HttpStatusCode.OK, memoproductmaps); })); }
public HttpResponseMessage GetMemoProductMap(HttpRequestMessage request, int memoproductmapsId) { return(GetHttpResponse(request, () => { HttpResponseMessage response = null; MemoProductMap memoproductmaps = _MPRCoreService.GetMemoProductMap(memoproductmapsId); // notice no need to create a seperate model object since MemoProductMap entity will do just fine response = request.CreateResponse <MemoProductMap>(HttpStatusCode.OK, memoproductmaps); return response; })); }
public HttpResponseMessage DeleteMemoProductMap(HttpRequestMessage request, [FromBody] int memoproductmapsId) { return(GetHttpResponse(request, () => { HttpResponseMessage response = null; // not that calling the WCF service here will authenticate access to the data MemoProductMap memoproductmaps = _MPRCoreService.GetMemoProductMap(memoproductmapsId); if (memoproductmaps != null) { _MPRCoreService.DeleteMemoProductMap(memoproductmapsId); response = request.CreateResponse(HttpStatusCode.OK); } else { response = request.CreateErrorResponse(HttpStatusCode.NotFound, "No memo product maps found under that ID."); } return response; })); }
public MemoProductMap UpdateMemoProductMap(MemoProductMap memoProductMap) { return(Channel.UpdateMemoProductMap(memoProductMap)); }