❔ EF Core question
Currently I define my models like this, should these collections be defined as null! or should I do new List<Client>() in the class?
currently I add clients when I create an user like this
public class User : BaseEntity
{
public ulong OAuthId { get; set; }
public Role Role { get; set; }
public ICollection<UserClient> UserClients { get; set; } = null!;
public ICollection<Client> Clients { get; set; } = null!;
}var clients = _clients.GetClients()
.Where(x => createUserDto.ClientIds!.Contains(x.Id));
// TODO: add clients
user.Clients = new List<Client>();
clients.ToList().ForEach(x=> user.Clients.Add(x));
await _users.CreateUser(user);