Hi,
I am trying to do a parent/child join on the same entity (same SQL table)
in this format:
EntityType1[] = DataContext.EntityType1.Join(
EntityType1,
EntityParent => EntityParent.ID,
EntityChild => EntityChild.ParentID,
(EntityParent, EntityChild) => new { EntityParent, EntityChild }
).Select(obj => obj.EntityChild).ToArray();
Obviously this is pseudo and I have a reason for doing the join in my where
clause, I am having a problem where the query generated appears to come out
with the parent object on both sides of this join, see below:
SELECT EntityChild.* FROM EntityType1 EntityParent, EntityType1
EntityChild WHERE EntityParent.ID = EntityParent.ParentID
Is there some syntax I have missed to alias the second instance of the
Entity Type or is this a problem with the query generation?
Thanks,
Carl
--
You received this message because you are subscribed to the Google Groups
"DbLinq" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/dblinq?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.