LINQ Inner Join - Return From Both Tables
问题 I have the following query var customers = from customer in context.tblAccounts join assoc in context.tblAccountAssociations on customer.AccountCode equals assoc.ChildCode where customer.AccountType == "S" || customer.AccountType == "P" select customer, assoc; C# does not like the "assoc" at the end. My error message is: A local variable named 'assoc' cannot be declared in this scope because it would give a different meaning to 'assoc', which is already used in a 'child' scope to denote