How to properly handle RMG089 and RMG090 #1889
Replies: 1 comment
-
|
You can do this globally or on each method with attributes or an editorconfig file, see docs. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have two records
When mapping Zoo to Foo, I have a message "RMG089 Mapping the nullable source property ServerId of A.Zoo to the target property ServerId of A.Foo which is not nullable"
The generated code is :
which is totally fine for me.
How can I get rid off the RMG089 message (as well as RMG090) when I'm fine with the code generated?
I see that a new attribute
SuppressNullMismatchDiagnostichas been added to prerelease version, but I can only be put on theMapPropertyattribute, and I don't want to add that attribute for each property (this sample is kept simple for illustration, but I have many more nullable properties) but globally (or at least at the class level).Beta Was this translation helpful? Give feedback.
All reactions