public static void Initialize(WorkshopManagementDBContext context)
 {
     Policy
     .Handle <Exception>()
     .WaitAndRetry(10, r => TimeSpan.FromSeconds(10))
     .Execute(() => context.Database.Migrate());
 }
示例#2
0
        public static void Initialize(WorkshopManagementDBContext context)
        {
            Log.Information("Ensure WorkshopManagement Database");

            Policy
            .Handle <Exception>()
            .WaitAndRetry(5, r => TimeSpan.FromSeconds(5), (ex, ts) => { Log.Error("Error connecting to DB. Retrying in 5 sec."); })
            .Execute(() => context.Database.Migrate());

            Log.Information("WorkshopManagement Database available");
        }
示例#3
0
 public static void Initialize(WorkshopManagementDBContext context)
 {
     context.Database.Migrate();
 }