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