You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However this code using the dyanamic linq will not work if the column is nullable and throws a ParseException - "Methods on type 'Int32?' are not accessible"
Update - Seems you can replicate the ToString in LinqToEntity by doing a conversion to its non nullable type first and then calling to string myDbContext.Contact.Select("int(NullableIntColumn).ToString()");
The text was updated successfully, but these errors were encountered:
When writing an entity query you can convert a nullable column to a string
myDbContext.Contact.Select(c => c.NullableIntColumn.ToString());
However this code using the dyanamic linq will not work if the column is nullable and throws a ParseException - "Methods on type 'Int32?' are not accessible"
myDbContext.Contact.Select("NullableIntColumn.ToString()");
Update - Seems you can replicate the ToString in LinqToEntity by doing a conversion to its non nullable type first and then calling to string
myDbContext.Contact.Select("int(NullableIntColumn).ToString()");
The text was updated successfully, but these errors were encountered: