I have parent and child class. For example, my parent class is Customers and child class is CustomerDetails.
I wanted to load all customers with state as NY (where state is property in customer details ). Could someone let me know how this can be done using LINQ?
from p in DataContextObj.Customers where p.CustomerDetails..... ??
You are using the Entity Framework and are using LINQ to Entities?
Or you want to do this query against a graph of business objects already in memory?
Thanks for the reply. I'm using LINQ to SQL classes.
I was also able to achieve what I wanted. I tried using the LINQ query below and it worked.
from p in DataContextObj.Customers where p.CustomerDetails.Any (x => x.State == "NY")
Copyright (c) Marimer LLC