Code first custom SQL migration timeout exception

后端 未结 2 1378
栀梦
栀梦 2020-12-10 01:33

I am trying to create FULL TEXT index using Entity Framework Migration by executing custom Sql.

My migration class looks like this:

public partial cl         


        
2条回答
  •  鱼传尺愫
    2020-12-10 02:21

    Use Configuration.cs file to set custom time out:

    internal sealed class Configuration : DbMigrationsConfiguration
    {
        public Configuration()
        {
            AutomaticMigrationsEnabled = false;
            ContextKey = "YourDbContext";
    
            // New timeout in seconds
            this.CommandTimeout = 60 * 5; 
        }
    }
    

提交回复
热议问题