So, I was having the same issue. When I checked the Departments table in the database, the ConcurrencyToken field was populated with a GUID of 00000000-0000-0000-0000-000000000000
. This was due to the EF migration builder creating a default value for the GUID field in the Up() method. Check your <Timestamp>_RowVersion.cs file for this.
Being a newbie, I didn't know how to manage this. I just decided to run the following commands to drop the DB and create a new migration
drop the database: dotnet ef database drop
Delete all files in the Migrations folder of the project
create a new migration: dotnet ef migrations add <Migration name>
Update the database: dotnet ef database update
Then build and run your application. You should notice that a unique GUID is created for each department or whatever entity set you are applying the GUID field to.
In hindsight, I think removing the default value line in the <Timestamp>_RowVersion.cs file would have worked, but I didn't think that through since I was so frustrated. So, try that first before dropping the database, and please let me know if that worked.