Add retry option for SQL server example.
This commit is contained in:
parent
b32e390c5c
commit
2d14366feb
@ -42,6 +42,13 @@ public class DeadBallZoneLeagueDbContext : DbContext
|
||||
.HasName("GetEarliestMatch");
|
||||
}
|
||||
|
||||
// This is an example override for SQL Server:
|
||||
// protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) => optionsBuilder.UseSqlServer("Data Source=(localdb)\\MSSQLLocalDB;Initial Catalog=FootballLeague_EfCore; Encrypt=true", sqlOptions => {
|
||||
// sqlOptions.EnableRetryOnFailure(maxRetryCount: 5,
|
||||
// maxRetryDelay: TimeSpan.FromSeconds(5),
|
||||
// errorNumbersToAdd: null);
|
||||
// });
|
||||
|
||||
protected override void ConfigureConventions(ModelConfigurationBuilder configurationBuilder)
|
||||
{
|
||||
// These apply to all the settings for all models.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user