Hello, we’re preparing to upgrade from 10.1.500 to 10.2.100 and I’m having trouble with a couple of our BPMs. In 10.1.500 we would use System.Data.Objects.SqlClient.SqlFunctions.StringConvert() but the System.Data.Entity this appears to be missing in 10.2. How can I bring this, or should I do this a different way?
UD12 = (from uRow in Db.UD12
where uRow.Company == ttLaborDtlRow.Company
&& uRow.Key1 == ttLaborDtlRow.JobNum
&& uRow.Key2 == System.Data.Objects.SqlClient.SqlFunctions.StringConvert((decimal)asm).Trim()
&& uRow.Key3 == System.Data.Objects.SqlClient.SqlFunctions.StringConvert((decimal)opr).Trim()
&& uRow.Key4 == opcode
select uRow).FirstOrDefault();
I tried just doing a straight ((decimal)opr).ToString(“F0”).Trim() but that throws a ‘NotSupportException’ exception “LINQ to Entities does not recognize the method ‘System.String ToString(System.String)’ method, and this method cannot be translated into a store expression.”