0

私はモデルを持っています

public class Account
    {
        [Key]
        public int AccountID { get; set; }

        public string UserName { get; set; }

        public string Password { get; set; }

        public string FullName { get; set; }
}

public class Role
{
    [Key]
    public int RoleID { get; set; }
    public string RoleKey { get; set; }
    public string RoleName { get; set; }

}

public class AccountRole
{
    [Key]
    public int ID { get; set; }
    public int AccountID { get; set; }
    public string Role { get; set; }

}

チェックボックスをリストするために、1つのビュー更新アカウントとリストロールを使用したい。チェックボックスをオンにすると、AccountRole に挿入するロールが表示されます。

ビューの作成方法を教えてください。

4

1 に答える 1