Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch EF Core to mongodb on WebApp projects. #19792

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ private void ChangeThemeStyle(ProjectBuildContext context, string themeStyleName
var defaultThemeStyleName = "LeptonXStyleNames.System";
var newThemeStyleName = $"LeptonXStyleNames.{themeStyleName}";

var filePaths = new List<string>
var filePaths = new List<string>
{
"/MyCompanyName.MyProjectName.Web/MyProjectNameWebModule.cs",
"/MyCompanyName.MyProjectName.Web.Host/MyProjectNameWebModule.cs",
Expand All @@ -40,6 +40,10 @@ private void ChangeThemeStyle(ProjectBuildContext context, string themeStyleName
"/MyCompanyName.MyProjectName.Blazor/MyProjectNameBlazorModule.cs",
"/MyCompanyName.MyProjectName.Blazor.Server/MyProjectNameBlazorModule.cs",
"/MyCompanyName.MyProjectName.Blazor.Server/MyProjectNameModule.cs",
"/MyCompanyName.MyProjectName.Blazor.WebApp/MyProjectNameBlazorModule.cs",
"/MyCompanyName.MyProjectName.Blazor.WebApp.Client/MyProjectNameBlazorClientModule.cs",
"/MyCompanyName.MyProjectName.Blazor.WebApp.Tiered/MyProjectNameBlazorModule.cs",
"/MyCompanyName.MyProjectName.Blazor.WebApp.Tiered.Client/MyProjectNameBlazorClientModule.cs",
"/MyCompanyName.MyProjectName.Blazor.Server.Mongo/MyProjectNameModule.cs",
"/MyCompanyName.MyProjectName.Host/MyProjectNameModule.cs",
"/MyCompanyName.MyProjectName.Host.Mongo/MyProjectNameModule.cs",
Expand Down Expand Up @@ -76,4 +80,4 @@ protected void ChangeThemeStyleName(ProjectBuildContext context, string filePath

file.SetLines(lines);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,29 @@ public override void Execute(ProjectBuildContext context)
"/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/appsettings.json"
);

//MyCompanyName.MyProjectName.Blazor.WebApp

ChangeProjectReference(
context,
"/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp/MyCompanyName.MyProjectName.Blazor.WebApp.csproj",
_hasDbMigrations ? "EntityFrameworkCore.DbMigrations" : "EntityFrameworkCore",
"MongoDB"
);

ChangeNamespaceAndKeyword(
context,
"/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp/MyProjectNameBlazorModule.cs",
"MyCompanyName.MyProjectName.EntityFrameworkCore",
"MyCompanyName.MyProjectName.MongoDB",
_hasDbMigrations ? "MyProjectNameEntityFrameworkCoreDbMigrationsModule" : "MyProjectNameEntityFrameworkCoreModule",
"MyProjectNameMongoDbModule"
);

ChangeConnectionStringToMongoDb(
context,
"/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.WebApp/appsettings.json"
);

//MyCompanyName.MyProjectName.HttpApi.HostWithIds

ChangeProjectReference(
Expand Down
Loading