Hello, I have an ASP application.I performed the tutorial on code first migrations. When I executed the commands, the following code was generated for the user table:
My problem is that I don't need some columns. So, I removed the code from those columns and updated my DB. But, when I try to authenticate a user, I get this error:
Invalid column name 'EmailConfirmed'.Invalid column name 'PhoneNumberConfirmed'.Invalid column name 'TwoFactorEnabled'.Invalid column name 'LockoutEndDateUtc'.Invalid column name 'LockoutEnabled'.Invalid column name 'AccessFailedCount'.
But these columns no longer exist because I deleted them. Or, is it possible to put it back and assign them default values for example:
EmailConfirmed=falsePhoneNumberConfirmed=false
to avoid making an insertion when creating a user. I use EF 6.2.0
Member
2 Points
21 Posts
Invalid column name in entity framework
Dec 10, 2018 06:17 PM|kstMan|LINK
Hello, I have an ASP application.I performed the tutorial on code first migrations. When I executed the commands, the following code was generated for the user table:
My problem is that I don't need some columns. So, I removed the code from those columns and updated my DB. But, when I try to authenticate a user, I get this error:
But these columns no longer exist because I deleted them. Or, is it possible to put it back and assign them default values for example:
to avoid making an insertion when creating a user. I use EF 6.2.0
Need help please.