© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Search
Star
Feedback
Setup for Free
C
C#
•
4y ago
•
16 replies
barcode
What does null! do in EF CORE? [Answered]
Hi
, I
've used scaffold db to generate models from existing table and I noticed this interesting pattern
public City City { get; set; } = null!;
public City City { get; set; } = null!;
Keep in mind city
_id must not be null so why does EF Core generate it with default value of null and what does
! mean after unll
?
C#
Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
EF-Core data reference [Answered]
C
C# / help
4y ago
Can't install EF core tools [Answered]
C
C# / help
4y ago
EF Core
C
C# / help
2y ago