📜  fluent api c# hasmany withmany - C# 代码示例

📅  最后修改于: 2022-03-11 14:49:07.050000             🧑  作者: Mango

代码示例1
public class User
{
    public User()
    {
        Roles = new List();
    }

    public int UserId { get; set; }
    public string UserName { get; set; }
    public ICollection Roles { get; set; }
}

public class Role
{
    public int RoleId { get; set; }
    public string RoleName { get; set; }
}