public HttpResponseMessage Update(HttpRequestMessage request, MenuGroupModel MenuGroupModel)
 {
     return(CreateHttpResponse(request, () =>
     {
         HttpResponseMessage response = null;
         if (!ModelState.IsValid)
         {
             request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState);
         }
         else
         {
             var MenuGroupService = new MenuGroupService();
             MenuGroupService.Update(MenuGroupModel);
             response = request.CreateResponse(HttpStatusCode.OK);
         }
         return response;
     }));
 }
 public HttpResponseMessage DeleteMulti(HttpRequestMessage request, int[] id)
 {
     return(CreateHttpResponse(request, () =>
     {
         HttpResponseMessage response = null;
         if (!ModelState.IsValid)
         {
             response = request.CreateResponse(HttpStatusCode.BadRequest, ModelState);
         }
         else
         {
             var MenuGroupService = new MenuGroupService();
             MenuGroupService.DeleteAll(id);
             response = request.CreateResponse(HttpStatusCode.OK);
         }
         return response;
     }));
 }