I am working on an Entity framework project(code first) and got a situation to alter the table. I have run the add-migration for the same and got the migration file. when i try to apply this migration to the DB its taking a lot of time and I am getting a time out error in my application.
Here I am trying to alter columns(11 columns) to nullable for an existing table with 24379 records and few columns have existing values.
Is there any logic so that my application waits and the respective migration applies to my DB. I have increased the Transaction Timeout to 65535 seconds in the DB.Still the problem persists.
Any help?
Thanks in advance
You need to use the commandtimeout:
https://msdn.microsoft.com/en-us/library/system.data.entity.migrations.dbmigrationsconfiguration.commandtimeout(v=vs.113).aspx