小编Ola*_*vid的帖子

无法使用继承 IdentityUser 的类的视图搭建 Asp.net Core 控制器

User我的申请中有一个课程

    public class User
    {
        [Required, MinLength(3), MaxLength(10)]
        public string FirstName { get; set; }

        [MinLength(3), MaxLength(10)]
        public string MiddleName { get; set; }

        [Required, MinLength(3), MaxLength(10)]
        public string LastNmae { get; set; }

    }
Run Code Online (Sandbox Code Playgroud)

then i try to scaffold controller with view for this class, the drop down for model class included the User class and other classes that extend it such as Student and Admin

Then i make the User class inherit IdentityUser class

    public class User: …
Run Code Online (Sandbox Code Playgroud)

entity-framework asp.net-core

7
推荐指数
0
解决办法
975
查看次数

标签 统计

asp.net-core ×1

entity-framework ×1