I want a UCASE or ToUpper column in my LINQ query.
var query = from rsn in db.RSLReasons
orderby rsn.REFCMNT
select new {rsn.REFCODE, rsn.REFCMNT};
dtReasons = query.ToADOTable(rec => new object[] { query });
If I try to run the following code:
var query = from rsn in db.RSLReasons
orderby rsn.REFCMNT
select new {rsn.REFCODE, rsn.REFCMNT.ToString()};
dtReasons = query.ToADOTable(rec => new object[] { query });
I get the following compilation error message:
Invalid element of anonymous type descriptor. Members of an anonymous type must be declared a member of the appointment, a simple name, or member access.
source
share