This project has moved and is read-only. For the latest updates, please go here.

SqlFunctions?

Jun 27, 2014 at 9:06 PM
I've built couple of classes for composing complicated queries in a way that can be construct in the browser and serialized to a webservice, using Linq expressions and PredicateBuilder, and Effort has been very useful in writing unit tests for them.

I just finished extending this to provide a SQL-patterned "Like" function, using MS's SqlFunctions.PatIndex() method. I expected the result to work against SqlServer, and to fail against other databases - MS doesn't ask other DB providers to implement SqlFunctions, and it's documentation expressly states that it will only run against SqlServer.

So, when it didn't run against Effort I was not surprised.

But I was wondering, have you ever considered implementing the SqlFunctions methods?
Sep 8, 2014 at 10:48 PM
Edited Sep 8, 2014 at 11:01 PM
Currently I see nothing against supporting SqlServer specific functions. However the list of them is quite long. Which ones would you like to use?
Sep 8, 2014 at 10:52 PM
The one I was using was PatIndex(), which is necessary to provide a "LIKE"-like functionality. I've not yet found a need for the others.
Sep 8, 2014 at 11:01 PM
Edited Sep 8, 2014 at 11:02 PM