0
pankajmathur created
We are facing an issue that the system throws timeout when seeding a tenant, in MVC 5.X we have specified the timeout in the Configuration class of the EntityFramework project
public Configuration()
{
AutomaticMigrationsEnabled = false;
ContextKey = "ManagementConsoleWeb";
CommandTimeout = 1000;
}
How can we achieve the same in the .Net Core 2.0.
2 Answer(s)
-
0
Try this:
public class MyDbContext : AbpZeroDbContext<Tenant, Role, User, MyDbContext>, IAbpPersistedGrantDbContext { public MyDbContext(DbContextOptions<MyDbContext> options) : base(options) { Database.SetCommandTimeout(10); // seconds } }
-
0
Thanks aaron...