This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at firstname.lastname@example.org
I've had this kicking around for a while in my code bucket and thought others might find it useful. It's just a wrapper to provide strongly typed queries with the older lightspeed query api:
Instead of this:
Entity.Attribute("Email") == email;
You'll be able to write this:
EntityExt.Attribute<User>(u => u.Email) == email;
and for collections, instead of this:
Entity.Attribute("Users.FirstName") == firstName;
You can use this:
EntityExt.Attribute<Company>(c => c.Users.Path().FirstName) == firstName;
- The use of the class EntityExt in replace of Entity - Entity being static doesn't allow me to hang any extension methods off it so I introduced EntityExt.
- Just use .Path() whenever you traverse a collection and that will give you access to the type in the collection making it a bit nicer than writing a  to get the type of element - just a bit nicer to read I think). It may need some tweaks for complex queries but for anything I've written it works great.
Enjoy some strongly typed loving and get rid of those pesky strings :-)