private DbExpression AlignTypes(DbExpression cqt, Type toClrType)
{
Type fromClrType = null; // not used in this code path
var toType = GetCastTargetType(cqt.ResultType, toClrType, fromClrType, false);
if (null != toType)
{
return cqt.CastTo(toType);
}
else
{
return cqt;
}
}