Hello,
I'm using 4.2 runtime and I created a function mapping to call FTS contains method on SQL Server. I'm getting the following error. Please help!
The Contains method on the type SQLFunctions isn't convertable to an LLBLGen Pro construct.
The code is this:
var x = new LinqMetaData(a);
x.CustomFunctionMappings = new SQLFunctionMappings();
var q = from m in x.MyTable
where SQLFunctions.Contains(m.MyField, "test")
select m;
var results = q.ToList();
The mapping is defined like this:
public class SQLFunctionMappings : FunctionMappingStore
{
public SQLFunctionMappings()
: base()
{
this.Add(new FunctionMapping
(
typeof(SQLFunctions),
"Contains",
2,
"Contains({0}, {1})")
);
}
}
public class SQLFunctions
{
public static bool Contains(string column, string expression)
{
return false;
}
}