I’m using Oracle Client 11.2.0.3 with 11g Oracle database and having troubles to convert numberical column data to string.
var items = new List<string>();
items = (from x in db.Table1
select x.ColA).ToList()); // ColA is NUMBER(9)
If I use Convert.ToString(x.ColA), I get LINQ to Entities does not recognize the method System.String ToString(Int32) method, and this method cannot be translated into a store expression
If I use x.ColA.ToString(), I get LINQ to Entities does not recognize the method System.String ToString() method, and this method cannot be translated into a store expression.
If I use System.Data.Objects.SqlClient.SqlFunctions.StringConvert((double)x.RESERVATION_ID), I get The specified method System.String StringConvert(System.Nullable1[System.Double]) on the type System.Data.Objects.SqlClient.SqlFunctions cannot be translated into a LINQ to Entities store expression.
1 Answer