Here's a basic example from the official .NET documentation for a many-to-many relationship using EF and .NET:
public class Post
{
public int Id { get; set; }
public List<Tag> Tags { get; } = [];
}
public class Tag
{
public int Id { get; set; }
public List<Post> Posts { get; } = [];
}
The Tags and Posts do not have a set. The join table only exists in the database, and there is, supposedly, no need to create an entity.
My question is: how do I set the value?
Thanks