コード例 #1
0
        public async Task <HttpResponseMessage> DeleteAsync(string contextId, string id)
        {
            try
            {
                var context = new DeleteLineItemContext(contextId, id);

                await OnDeleteLineItem(context);

                return(Request.CreateResponse(context.StatusCode));
            }
            catch (Exception ex)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex));
            }
        }
コード例 #2
0
        public async Task<HttpResponseMessage> Delete(string contextId, string id)
        {
            try
            {
                var context = new DeleteLineItemContext(contextId, id);
                
                await OnDeleteLineItem(context);

                return Request.CreateResponse(context.StatusCode);
            }
            catch (Exception ex)
            {
                return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex);
            }
        }