DeagleGross / SharpCoachPlugin

Rider C# plugin for easy code generation of mapping classes
MIT License
4 stars 2 forks source link

Add `null` checks when mapping internal classes #6

Open DeagleGross opened 3 years ago

DeagleGross commented 3 years ago

It is better to make checks on null objects.

Currently code is generated in this way:

id = foo.bar.id

But the suggestion is to generate it like this:

foo.bar is null ? null : foo.bar.id