Skip to content

Commit 91916f5

Browse files
committed
Append ";Encrypt=false;TrustServerCertificate=true" to the connection string
1 parent 001c59e commit 91916f5

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

BuildTT/BuildTT.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ private static void CreateTT(string generatorRoot, string ttRoot)
3232
Settings.GeneratorType = GeneratorType.EfCore; // EfCore, Ef6, Custom. Custom edit GeneratorCustom class to provide your own implementation
3333
3434
Settings.FileManagerType = FileManagerType.EfCore; // .NET Core project = EfCore; .NET 4.x project = VisualStudio; No output (testing only) = Null
35-
Settings.ConnectionString = ""Data Source=(local);Initial Catalog=Northwind;Integrated Security=True;MultipleActiveResultSets=True""; // This is used by the generator to reverse engineer your database
35+
Settings.ConnectionString = ""Data Source=(local);Initial Catalog=Northwind;Integrated Security=True;MultipleActiveResultSets=True;Encrypt=false;TrustServerCertificate=true""; // This is used by the generator to reverse engineer your database
3636
Settings.ConnectionStringName = ""MyDbContext""; // ConnectionString key as specified in your app.config/web.config/appsettings.json. Not used by the generator, but is placed into the generated DbContext constructor.
3737
Settings.DbContextName = ""MyDbContext""; // Class name for the DbContext to be generated.
3838
//Settings.DbContextInterfaceName= ""IMyDbContext""; // Defaults to ""I"" + DbContextName or set string empty to not implement any interface.

EntityFramework.Reverse.POCO.Generator/Database.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
184184
{
185185
if (!optionsBuilder.IsConfigured)
186186
{
187-
optionsBuilder.UseSqlServer(@"Data Source=(local);Initial Catalog=Northwind;Integrated Security=True;MultipleActiveResultSets=True");
187+
optionsBuilder.UseSqlServer(@"Data Source=(local);Initial Catalog=Northwind;Integrated Security=True;MultipleActiveResultSets=True;Encrypt=false;TrustServerCertificate=true");
188188
}
189189
}
190190

EntityFramework.Reverse.POCO.Generator/Database.tt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
Settings.GeneratorType = GeneratorType.EfCore; // EfCore, Ef6, Custom. Custom edit GeneratorCustom class to provide your own implementation
1717

1818
Settings.FileManagerType = FileManagerType.EfCore; // .NET Core project = EfCore; .NET 4.x project = VisualStudio; No output (testing only) = Null
19-
Settings.ConnectionString = "Data Source=(local);Initial Catalog=Northwind;Integrated Security=True;MultipleActiveResultSets=True"; // This is used by the generator to reverse engineer your database
19+
Settings.ConnectionString = "Data Source=(local);Initial Catalog=Northwind;Integrated Security=True;MultipleActiveResultSets=True;Encrypt=false;TrustServerCertificate=true"; // This is used by the generator to reverse engineer your database
2020
Settings.ConnectionStringName = "MyDbContext"; // ConnectionString key as specified in your app.config/web.config/appsettings.json. Not used by the generator, but is placed into the generated DbContext constructor.
2121
Settings.DbContextName = "MyDbContext"; // Class name for the DbContext to be generated.
2222
//Settings.DbContextInterfaceName= "IMyDbContext"; // Defaults to "I" + DbContextName or set string empty to not implement any interface.

0 commit comments

Comments
 (0)