I have been using L2E for a while, and I am pleasantly surprised with what I have seen so far. Today I ran into one of the expected walls, building dynamic queries (based on incoming request params). Finding a solution to this I stumbled onto Dynamic Linq.
Having downloaded a single class implementation for the dynamic part. There I ran into syntax problems when trying to construct a ‘Like’ based query on a string field. Searched for a while until I found this:
Which solved my problems 🙂 🙂 … and L2E still continues to impress on flexibility!
One thought on “Dynamic Linq to Entities – using Like conditions”
No need for Dynamic LINQ.
You can add an extension method to the String class and tie it to a Model Defined Function in the .edmx.