Last post Aug 24, 2018 12:54 PM by jlisonbidmc
Aug 23, 2018 07:22 PM|jlisonbidmc|LINK
I've been following this guide:
I created a .NET Framework web application with MVC as the link instructs, and I've created the classes described in the above link (also, what's the right folder to put them in? I put them in "models").
The guide doesn't tell me how to make the web application USE these classes, though. How do I do that? My approach was to remove the auto-generated classes for ApplicationUser and ApplicationUserManager and replace all references to CognitoUser and CognitoUserManager,
which I suspect isn't the right way. It now throws an exception within AccountController:
System.InvalidOperationException: 'The model backing the 'ApplicationDbContext' context has changed since the database was created. Consider using Code First Migrations to update the database (http://go.microsoft.com/fwlink/?LinkId=238269).'
Aug 24, 2018 08:26 AM|Nan Yu|LINK
Hi jlisonbidmc ,
This error means your DB tables and EF Entities are not match , you can try below solutions:
If you already deployed your application or you don't want remove data from database you must read about Code First Migrations. Here you have a link:
Deleting the __MigrationHistory table in SQL Server .
In addition , for how to use Amazon Cognito libraries , you can post question to
AWS support .
Aug 24, 2018 12:54 PM|jlisonbidmc|LINK
But am I using the User/UserManager classes in the intended way? The Amazon link doesn't say anything about using DB tables or EF entities. As far as I can tell, that's just something that the MVC wizard created, and is more or less hiding the accessing
mechanism from me.
I have a feeling that if I have to go down this rabbit hole, when there's no mention of it in the guide I'm trying to follow, then I must have done something wrong.