Index on nullable string field? #2440
Unanswered
AxelBrinck
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi! I have a question about what could be the best way to deal with nullable strings.
options.Schema.For().UniqueIndex(
UniqueIndexType.Computed,
x => x.NormalizedUsername);
Net7 is complaining about NormalizedUsername would cause a possible null reference.
Because the type is "string? NormalizedUsername".
But this sould not be a problem, right?
What could be the best approach for this?
Thank you very much!
Beta Was this translation helpful? Give feedback.
All reactions