making code modifications for both --type sqlserver-efcore and --type npgsql-efcore scenarios.
making relevant Program.cs changes
adding a NewDbContext file to the root of the project and using this new DbContext in above changes.
added DbContextHelper to hold related constants, dicts, and helpers for creating the NewDbContext.
CreateDbContext uses TemplateFoldersUtilities to get the relevant T4 file, and then uses our implementation of ITemplateInvoker to create and run the T4 template.
DbContextProperties is used to format the relevant Program.cs code changes.
added NewDbContext.tt, the T4 template for the new DbContext.
added db-apphost.json and db-webapi.json for the new Program.cs code modifications.
making code modifications for both
--type sqlserver-efcore
and--type npgsql-efcore
scenarios.Program.cs
changesNewDbContext
file to the root of the project and using this new DbContext in above changes.DbContextHelper
to hold related constants, dicts, and helpers for creating the NewDbContext.CreateDbContext
usesTemplateFoldersUtilities
to get the relevant T4 file, and then uses our implementation ofITemplateInvoker
to create and run the T4 template.DbContextProperties
is used to format the relevant Program.cs code changes.NewDbContext.tt
, the T4 template for the new DbContext.db-apphost.json
anddb-webapi.json
for the newProgram.cs
code modifications.