The issue was supposed we have one User table and it has some columns like Id, FirstName, Surname, PhoneNumber, or Email.
There we wanted to Rename Surname to LastName.
The problem occurs when we will run migration after the above Change. It will not make rename or alter to the column, It will Drop to Surname and Add a new column LastName. So it’s totally wrong in this case we will lose our column data.
So what to Do there. Follow these steps.
Step 2. Just look your data in database with old field.
Step 3. Just run your migration. update-database
Step 4. Just look your database again. Without lost our data we achive it.