Here is how I can return result of merging two string columns:
context.DBSET.Select(e => e.STRING_PROPERTY + e.STRING_PROPERTY)...
How can I merge e.STRING_PROPERTY + e.INTEGER_PROPERTY in one string result ?
Here is how I can return result of merging two string columns:
context.DBSET.Select(e => e.STRING_PROPERTY + e.STRING_PROPERTY)...
How can I merge e.STRING_PROPERTY + e.INTEGER_PROPERTY in one string result ?
You have to convert it to a string using SqlFunctions.StringConvert:
var results = context.DBSET
.Select(e => e.STRING_PROPERTY + SqlFunctions.StringConvert((double)e.INTEGER_PROPERTY));
Several C# members are supported by Linq to Entities and Linq to Sql behind the scenes. Amoung these, are String.ToString() and DateTime.Now. You could write:
context.DBSET.Select(e => e.STRING_PROPERTY + e.INTEGER_PROPERY.ToString())...
As @Reed pointed out, the SqlFunctions will also work, and will provide a more general, but less readable set of operations that can be performed in your query.