r1243 ftw!

On Mon, 2009-10-12 at 12:47 -0400, Jonathan Pryor wrote:
...
> I've now figured out wtf was wrong.  The fix...is another matter.
> 
> So the problem is that EntitySet<T>'s are not properly supported.  For
> example, this works:
> 
>         var q = from e in db.Employees select e;
>         foreach (var e in q)
>                 Console.WriteLine(e.Orders.Count);
> 
> So we're only using Employee.Orders, which is an EntitySet<Order>.
> 
> However, this fails:
> 
>         var q = from e in db.Employees select new {e.Orders};

And now the above works.  See ReadTest.C27_SelectEntitySet().  We even
support calling extension methods on EntitySet<T>, as is done in
ReadTest.C26_SelectWithNestedMethodCall():

            var q = from e in db.Employees select new
            {
                BackName    = e.LastName + ", " + e.FirstName,
                StaticName  = GetStaticName(e),
                InstanceName= GetInstanceName(e, s, "constant"),
                Territories = e.EmployeeTerritories.ToList(),
            };

I feel like it's taken me forever to get this working, but it's working
now, and I'm considerably happier.

 - Jon



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DbLinq" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/dblinq?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to