-
-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable the Nullable project property and fix all the warnings #194
Conversation
made some more improvements with regards to nullables. could you have a quick glance over and see if everything looks ok pls? |
Cleaned up some warnings that Rider was showing. |
okieee... did some more nullable improvements... |
Resolved the last of the warnings |
good job... |
pushed a beta release to nuget |
was just testing out the beta in an existing project and now i'm second guessing the choice to make the now i'm thinking that the only time it would be null is when the user instantiates an instance themselves and right up until it is saved to the db. so what are the chances that user code would be trying to read the what are your thoughts on this? |
I upgraded my existing project to the beta. I had 13 errors to start with and I had to "!" all the ids that I knew would be filled in. While I prefer IDs that are not null, the fact that there are 2 use cases where the id can be null means that it should be nullable. It is up to the user of the library to determine if they feel comfortable enough to use "!" on the id. I would rather do this than get a NullPointer Exception at runtime. |
okiee then... we'll leave the |
Enabled nullable for just the MongoDB.Entities project. Fixed all the warnings that resulted from the change.