var queryBrand = from brand in dbContext.BrandTranOrderTBs from orderPayment in dbContext.OrderPaymentTBs where brand.ID.ToString() == orderPayment.OrderIDs && orderPayment.Type==(int)OrderPaymentType.Brand && orderPayment.MemberID == memberIDOfBuyer && brand.Name.Contains(keywords) select new TranOrderView { ID=brand.ID, Name=brand.Name, OrderPaymentNo=orderPayment.OrderPaymentNo, Price=brand.Price, TranOrderStatus=brand.Status, Type = (int)TranOrderType.Brand };
var queryBrand = from brand in dbContext.BrandTranOrderTBs.ToList() from orderPayment in dbContext.OrderPaymentTBs where brand.ID.ToString() == orderPayment.OrderIDs && orderPayment.Type==(int)OrderPaymentType.Brand && orderPayment.MemberID == memberIDOfBuyer && brand.Name.Contains(keywords) select new TranOrderView { ID=brand.ID, Name=brand.Name, OrderPaymentNo=orderPayment.OrderPaymentNo, Price=brand.Price, TranOrderStatus=brand.Status, Type = (int)TranOrderType.Brand };