Concatenate int and string in LINQ
- by Waheed
HI, I am using the following code
from c in Country
where c.IsActive.Equals(true)
orderby c.CountryName
select new
{
countryIDCode = c.CountryID + "|" + c.TwoDigitCode,
countryName = c.CountryName
}
but following is the error while doing this...
Unable to cast the type 'System.Int32' to type 'System.Object'. LINQ to Entities only…