public HttpResponseMessage DeclineOrder(int orderid, int storeid) { ResponseStatus response = new ResponseStatus(); try { response = _repository.DeclineOrder(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)); } }