Why am I receiving an EntitySqlException when executing a LINQ to Entities query that uses a custom DB Function?
问题 As you may already know, when using LINQ to Entities with EF6 you can not use Int.TryParse or anything really trying to convert/cast a string to an int. I've created a custom function convention below to mitigate this: Public Class CustomFunctionConvention Implements IConceptualModelConvention(Of EdmModel) Public Sub Apply(item As EdmModel, model As DbModel) Implements IConceptualModelConvention(Of EdmModel).Apply Dim functionParseInt = New EdmFunctionPayload With { .CommandText = String