typesafe ObjectQuery in entity framework...

Mark Nicholls <[email protected]>
Newsgroups gmane.comp.windows.devel.dotnet.advanced
Message-ID <LISTSERV%[email protected]>
I've been doing this for about 3 hours, so I may have the wrong end of the
stick.

While doing the "hello world" type walkthrough I've come across....

            ObjectQuery<Department> departmentQuery =
                schoolContext.Department.Include("Course")
                .OrderBy("it.Name");

Now I'm a bit confused as to what an object query is, but this doesn't
look nice...."Course" and "it.Name"...are going to give me runtime errors
if (when) something changes.

I'm a bit confused as to how this sits with Linq....is there a Linq query
that I can use in the above which is typesafe and is of type
ObjectQuery<Department>?

===================================
This list is hosted by DevelopMentor®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.