views:

15

answers:

0

In our current set up we store client-specific data inside of an xml column in Sql Server instead of either creating client-specific columns or tables.

This works fine except that it means we end up needing to use dynamic sql for queries that query into those values, passing into our sprocs a partial where clause generated in code.

We tried using LINQ to SQL but it doesn't know how to translate LINQ to XML to SQL. Even tried Dynamic LINQ but it doesn't like Xquery syntax, and I'm not familiar enough with it to tweak the source to allow for it. I read about a project that was in the works a couple years ago for doing this, but it seems to have been abandoned.

We have a filter page that a user can filter their search by a number of different criteria, many of which are filters into the client-specific xml data. What is the best way to handle this scenario short of generating a string where clause that's passed into a sproc that appends it to the sproc's own query?