Hi,
I have a problem when trying to convert a bit into an int when fetching a dynamic list.
My field is defined as follow:
fields.DefineField(MyTableFields.MyIntCol, 1,AggregateFunction.Sum);
fields[1].ExpressionToApply = new DbFunctionCall("Convert(INT,{0})", new object[] { MyTableFields.MyIntCol});
The generated sql doesn't looks like this:
SUM(Convert(INT,{0})([dbo].[MyTable].[MyIntCol])) AS [MyIntCol]
I would have expect the {0} to be replaced by dbo].[MyTable].[MyIntCol]. Obviously this code doesn't work.
Your help will be much appreciated.
cheers,
Xav