public HttpResponseMessage AcceptOrder(int orderid, int storeid) { ResponseStatus response = new ResponseStatus(); try { response = _repository.AcceptOrder(orderid, storeid); if (response.isSuccess == true) { return(Request.CreateResponse(HttpStatusCode.OK, new { response })); } else { return(Request.CreateResponse(HttpStatusCode.BadRequest, new { response })); } } catch (Exception ex) { return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, "Something Worng !", ex)); } }