7

i have a User class in my application

    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; }

    }

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: IdentityUser
    {
        [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; }

    }

And then try to scaffold controller and view for the User class again, now the drop down for model class no longer included the User class and other classes that extend it

What is wrong

0

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.