EF4 LINQ Include(string) alternative to hard-coded string?

Posted by steve.macdonald on Stack Overflow See other posts from Stack Overflow or by steve.macdonald
Published on 2010-04-06T16:08:26Z Indexed on 2010/04/06 16:23 UTC
Read the original article Hit count: 253

Filed under:
|
|
|
|

Is there any alternative to this:

Organizations.Include("Assets").Where(o => o.Id == id).Single()

I would like to see something like:

Organizations.Include(o => o.Assets).Where(o => o.Id == id).Single()

to avoid the hard-coded string "Assets".

© Stack Overflow or respective owner

Related posts about entity-framework-4

Related posts about LINQ