If you ever wanted to assign an empty string to a value returned from a Linq query, use ?? (null-coalescing operator) to return Empty string in case of null
var qry= from row in context.Table
select new { FieldValue = (field.Value ?? string.Empty) };
Cheers,
Samitha
No comments:
Post a Comment