Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fixes #329
Changes the max size check so that it depends on the protocol version of the connection to the server. SQL Server 2008 and later use TDS verison >= 7.3 which can support large UDT types up to int.MaxValue not the previous short.MaxValue used.
I removed n byte[] allocation which wasn't being used. I reordered the type name check so it occurs before all the work to get and check the value. I changed the exception type from IndexOutOfRange exception with the default message to ArgumentOutOfRange exception with an explanation containing the size and max supported size, this will need localizing.
I'm hoping someone can do the dance required to point EF core at the PR build nuget version and see if the original problem reported by @capeseanis removed. I'm finding it rather difficult to try and work through. If the method is valid the same work can be done on the desktop framework version.
/cc @ajcvickers @aprognimak