Guest User

Untitled

a guest
Jul 20th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. private void btnQuick2_Click(object sender, EventArgs e)
  2. {
  3. using (EQDIRECTEntities context = new EQDIRECTEntities())
  4. {
  5. IQueryable<ProcessAreaLookup> query =
  6. from pal in context.ProcessAreaLookups
  7. where pal.CustomerProcessAreas.Any(o=>o.CustomerProduct.Customer.cust_CustomerID == 1 && o.CustomerProduct.Product.prdt_ProductID == 1)
  8. select pal;
  9.  
  10. var query2 = from cp in context.CustomerProducts
  11. join cpa in context.CustomerProcessAreas on cp.cp_CustomerProductsID equals cpa.CustomerProduct.cp_CustomerProductsID
  12. join pal in context.ProcessAreaLookups on cpa.ProcessAreaLookup.pal_ProcessAreaID equals pal.pal_ProcessAreaID
  13. where cp.Customer.cust_CustomerID == 1 && cp.Product.prdt_ProductID == 1
  14. select pal;
  15.  
  16. }
  17. }
Add Comment
Please, Sign In to add comment