One of the values in a select statement I have is created by concatenating a few columns from the database together.
Something like:
var q = from r in md.MyTable
select new { mycode = r.Prefix + (r.No ?? 0) + r.Suffix1 + r.Suffix2 };
everything but r.No is a normal string, r.No is a nullable int.
If I do nothing, it will try and convert the r.Prefix value to an int, which of course fails. If I try to do anything like:
var q = from r in md.MyTable
select new { mycode = r.Prefix + (r.No ?? 0).ToString() + r.Suffix1 + r.Suffix2 };
It will give me an error: "The parameter at position 1 is of an unsupported type: Call"
I assume it is trying to do the concatenation at the DB level instead of at the application level?