1
votes

I'm working in C# and I'm having an issue after changes in model like regular expression.

I'm getting the following error:

enter image description here

The model backing the 'newvalidContext' context has changed since the database was created. Consider using Code First Migrations to update the database (go.microsoft.com/fwlink/?LinkId=238269).

1

1 Answers

2
votes

If you change something in your Model you have to migrate it so that the changes also apply in the database. "first you drop and delete your old migration"

then you need to enter:

dotnet ef migrations add init1

then:

dotnet ef database update