I have the following query that runs successfully in LinqPad:
var results =
from container in Container
join containerType in ContainerType on container.ContainerType equals containerType
where containerType.ContainerTypeID == 2
select new { ContainerID = container.ContainerID, TypeID = container.ContainerTypeID};
results.Dump();
I would like to change the select to use an indexer so that the select would look something like this:
select new { ContainerID = container.ContainerID, TypeID = container.ContainerTypeID, ContainerIndex = index };
What I cannot seem to get right is the proper syntax for select to use the select indexer.
Thanks for your help.