Let\'s say you have two tables, \"Users\" and \"UserRoles\". Here\'s how the two tables are structured (table - columns):
Users - UserID (int)
UserRoles - U
This also worked:
HasMany(u => u.Roles) .WithTableName("UserRoles") .Component(role => role.Map(r => r.Name)) .AsList();
You don't need to map Role or UserRoles.
Make sure Role implements IEquatable < Role > ;.
IEquatable < Role > ;.