C# Entity Framework: Linq Filter on GrandChildren and Conduct a Select on the Parent
问题 Our company is currently using Entity Framework Net Core 2.2 with Sql Server Trying to find all Distinct customers who purchased a certain Product Input Parameter. When trying to do final select, it shows b lambda as Product. We need the Distinct Customers showing up last. How the EF Linq query be written to get this for distinct Customers? var taxAgencyDistinctList = db.Customer .SelectMany(b => b.Transactions) .SelectMany(b => b.Purchases) .Select(b => b.Product) .Where(b => b.BKProduct ==