This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$cloudService="corp-ods-db" | |
$ilb="corp-ods-lb" | |
$subnet="AlwaysOn-Static" | |
$IP="10.10.4.7" | |
Add-AzureInternalLoadBalancer -ServiceName $cloudService -InternalLoadBalancerName $ilb –SubnetName $subnet –StaticVNetIPAddress $IP | |
$vmNames=@("corp-ods-db1","corp-ods-db2") | |
$endPointName="SQLServer" | |
$prot="tcp" | |
$localPort=1433 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) | |
{ | |
//Generically set the connection string regardless of .UseSqlServer/.UsePgSQL/etc. | |
var relationalOptions = optionsBuilder.Options.FindExtension<RelationalOptionsExtension>(); | |
optionsBuilder.Options.WithExtension(relationalOptions.WithConnectionString(_connectionString)); | |
} |