feat(Immortal) Disabling SQL

This commit is contained in:
2022-03-30 21:28:08 -04:00
parent 4d27140e36
commit 363d6835b8
21 changed files with 427 additions and 132 deletions
+8
View File
@@ -6,6 +6,14 @@
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DefineConstants>TRACE;NO_SQL</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DefineConstants>TRACE;NO_SQL</DefineConstants>
</PropertyGroup>
<ItemGroup>
<SupportedPlatform Include="browser" />
</ItemGroup>
@@ -6,6 +6,8 @@
@using Microsoft.EntityFrameworkCore
@implements IDisposable
<div onmouseleave="@HoverOut" class="desktopNavContainer">
<div class="menuHeader" @onmouseover="() => NavigationService.ChangeNavigationState(NavigationStateType.Hovering_Menu)">
<NavLink href="/" class="websiteTitle">
@@ -97,12 +99,21 @@
</style>
@code {
#if NO_SQL
[Parameter]
public List<WebSectionModel> WebSections { get; set; }
[Parameter]
public List<WebPageModel> WebPages { get; set; }
#else
[Parameter]
public DbSet<WebSectionModel> WebSections { get; set; }
[Parameter]
public DbSet<WebPageModel> WebPages { get; set; }
#endif
protected override void OnInitialized() {
NavigationService.Subscribe(StateHasChanged);
+12 -2
View File
@@ -1,4 +1,6 @@
@using Model.Website
@using Model.Website
@using Microsoft.EntityFrameworkCore
<div class="mobileFooter">
<div class="mobileNavSectionsContainer">
@@ -136,13 +138,21 @@
</style>
@code {
#if NO_SQL
[Parameter]
public List<WebSectionModel> WebSections { get; set; }
[Parameter]
public List<WebPageModel> WebPages { get; set; }
#else
[Parameter]
public DbSet<WebSectionModel> WebSections { get; set; }
[Parameter]
public DbSet<WebPageModel> WebPages { get; set; }
#endif
[Inject]
public NavigationManager NavigationManager { get; set; }
@@ -141,12 +141,22 @@
</style>
@code {
#if NO_SQL
[Parameter]
public List<WebSectionModel> WebSections { get; set; }
[Parameter]
public List<WebPageModel> WebPages { get; set; }
#else
[Parameter]
public DbSet<WebSectionModel> WebSections { get; set; }
[Parameter]
public DbSet<WebPageModel> WebPages { get; set; }
#endif
bool NavOpen = true;