public AllResponseCartItem All() { try { var response = new AllResponseCartItem(); var bc = new CartItemBusiness(); response.Result = bc.All(); return(response); } catch (Exception ex) { var httpError = new HttpResponseMessage() { StatusCode = (HttpStatusCode)422, ReasonPhrase = ex.Message }; throw new HttpResponseException(httpError); } }