Refactor Database class (#616)

Refactor Database into DatabaseContext
Moved into separate folder so it actually has a namespace instead sitting in the root
This commit is contained in:
Josh 2023-02-15 23:54:30 -06:00 committed by GitHub
commit 64b95e807d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
246 changed files with 1211 additions and 965 deletions

View file

@ -1,4 +1,4 @@
@using LBPUnion.ProjectLighthouse
@using LBPUnion.ProjectLighthouse.Database
@using LBPUnion.ProjectLighthouse.Localization
@using LBPUnion.ProjectLighthouse.Servers.Website.Extensions
@using LBPUnion.ProjectLighthouse.Types.Entities.Level
@ -25,7 +25,7 @@
{
Score score = Model.Scores[i];
string[] playerIds = score.PlayerIds;
Database database = Model.Database;
DatabaseContext database = Model.Database;
<div class="item">
<span class="ui large text">
@if(canDelete)

View file

@ -1,12 +1,12 @@
@using System.Diagnostics
@using LBPUnion.ProjectLighthouse
@using LBPUnion.ProjectLighthouse.Database
@using LBPUnion.ProjectLighthouse.Types.Entities.Level
@using LBPUnion.ProjectLighthouse.Types.Entities.Profile
@using LBPUnion.ProjectLighthouse.Types.Moderation.Cases
@model LBPUnion.ProjectLighthouse.Types.Entities.Moderation.ModerationCase
@{
Database database = new();
DatabaseContext database = new();
string color = "blue";
string timeZone = (string?)ViewData["TimeZone"] ?? TimeZoneInfo.Local.Id;

View file

@ -1,6 +1,6 @@
@using System.Web
@using LBPUnion.ProjectLighthouse
@using LBPUnion.ProjectLighthouse.Configuration
@using LBPUnion.ProjectLighthouse.Database
@using LBPUnion.ProjectLighthouse.Localization
@using LBPUnion.ProjectLighthouse.Servers.Website.Extensions
@using LBPUnion.ProjectLighthouse.Types.Entities.Profile
@ -11,7 +11,7 @@
@{
User? user = (User?)ViewData["User"];
await using Database database = new();
await using DatabaseContext database = new();
string slotName = HttpUtility.HtmlDecode(string.IsNullOrEmpty(Model!.Name) ? "Unnamed Level" : Model.Name);