I’m trying to switch to .Net 6.0 from .Net 3.1 and I encounter a few issues.
Apparently, in .Net 6.0 models need to have non-nullable property, for example:
public string Email { get; set; } = String.Empty;
The problem for the DbSet I fixed like:
public DbSet<User>? Users { get; set; }
However, now I’m getting warnings of possible null reference argument/return as the image below:

>Solution :
As the docs show you can use Set method with expression bodied property:
public DbSet<User> Users => Set<User>();