2
Vote

Support all Edm canonical function

description

The mmdb doesn't support some really basic functions, like String.IsNullOrEmpty or DateTime.Compare.

Is there some kind of workaround for this, or are these functions planned to be included? My codebase is just littered with these two functions, which renders Effort useless in my use case. :(

comments

tamasflamich wrote Aug 28, 2012 at 9:23 AM

I am aware of the lack of complete EDM function mapping in Effort, it is indeed planned to be fixed.

If you wanted to continue testing the library, you could add additional Edm function support in the following class:
http://effort.codeplex.com/SourceControl/changeset/view/11d013f93a0e#Main%2fSource%2fEffort%2fInternal%2fDbCommandTreeTransformation%2fCanonicalFunctions.cs

Its implementation seems a bit messy, so I will probably redesign it completely.

You can find a complete list of EDM functions here:
http://msdn.microsoft.com/en-us/library/bb738626.aspx

eatfrog wrote Aug 28, 2012 at 9:48 AM

Awesome. Thanks for the quick response. :)

I've been planning to help you out with this project, but it's been difficult to find the time recently. I'll try to take a look at this at some point in the near future.

okiaconvit wrote Oct 20, 2012 at 4:41 AM

First of all, I wanted to say that this is awesome tool for unit testing. However, there is some errors what make me confused, such as:

"There is no matching CLR function in MMDB for function Edm.IndexOf."

As I know, the mmdb does not support IndexOf function, also, I downloaded the code you refer to. But forgive my knowledge, I do not know the way how to add addtional Edm.IndexOf function. I will appreciate that if you can give me a hand, thanks in advance.

tamasflamich wrote Oct 20, 2012 at 1:16 PM

A contributor has been working on this (along with other things) for a while, you can check his implementation at his fork repository:

http://effort.codeplex.com/SourceControl/changeset/8acb420d2571#Main%2fSource%2fEffort%2fInternal%2fDbCommandTreeTransformation%2fCanonicalFunctions.cs