hazzik / DelegateDecompiler

A library which is able to decompile a delegate or a method body to its lambda representation
MIT License
526 stars 62 forks source link

Fix for issue 131 (accessing nullable types inside computed VS15.8) #132

Closed beechj closed 6 years ago

beechj commented 6 years ago

Here is a pull request which should resolve the issue with the latest version of Visual Studio and nullable types.

Basically I am dropping any calls to ValueOrDefault. Where I find an expression which needs to access a nullable type I am substituting in an appropriate expression which accesses the Value or returns the default value. This way I am removing all calls to ValueOrDefault which is not supported in Linq to Entities.

I have run the changes through the entire test harness and all tests passed successfully.

beechj commented 6 years ago

Apologies, this PR is failing one of the nullable tests. I will submit another