public HttpResponseMessage GetOrderFormJson(string orderId) { ReceivableBLL receivebll = new ReceivableBLL(); var jsonData = new { order = orderBLL.GetEntity(orderId), orderEntry = orderEntryBLL.GetList(orderId), descriptionEntry = orderdescriptionbll.GetList_(orderId), receivableList = receivebll.GetPaymentRecord(orderId).Where(x => (x.PaymentPrice == null? 0 : x.PaymentPrice) > 0), drawbackList = receivebll.GetPaymentRecord(orderId).Where(x => (x.DrawbackPrice == null ? 0 : x.DrawbackPrice) > 0), }; HttpResponseMessage ut = new HttpResponseMessage { Content = new StringContent(jsonData.ToJson(), Encoding.GetEncoding("UTF-8"), "application/json") }; return(ut); }