excise entity framework from all remaining code
This commit is contained in:
parent
d6c3133d52
commit
ff92c5f335
62 changed files with 402 additions and 1339 deletions
|
|
@ -13,8 +13,7 @@
|
|||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
using Catalogger.Backend.Database.Dapper.Repositories;
|
||||
using Catalogger.Backend.Database.Queries;
|
||||
using Catalogger.Backend.Database.Repositories;
|
||||
|
||||
namespace Catalogger.Backend.Services;
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@ using Catalogger.Backend.Cache;
|
|||
using Humanizer;
|
||||
using Remora.Discord.API.Abstractions.Rest;
|
||||
using Remora.Discord.API.Gateway.Commands;
|
||||
using Remora.Discord.Gateway;
|
||||
using Remora.Rest.Core;
|
||||
|
||||
namespace Catalogger.Backend.Services;
|
||||
|
|
|
|||
|
|
@ -16,10 +16,8 @@
|
|||
using System.Diagnostics;
|
||||
using Catalogger.Backend.Cache.InMemoryCache;
|
||||
using Catalogger.Backend.Database;
|
||||
using Catalogger.Backend.Database.Dapper;
|
||||
using Dapper;
|
||||
using Humanizer;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Prometheus;
|
||||
|
||||
namespace Catalogger.Backend.Services;
|
||||
|
|
@ -40,7 +38,6 @@ public class MetricsCollectionService(
|
|||
var timer = CataloggerMetrics.MetricsCollectionTime.NewTimer();
|
||||
|
||||
await using var scope = services.CreateAsyncScope();
|
||||
await using var db = scope.ServiceProvider.GetRequiredService<DatabaseContext>();
|
||||
await using var conn = scope.ServiceProvider.GetRequiredService<DatabaseConnection>();
|
||||
|
||||
var messageCount = await conn.ExecuteScalarAsync<int>("select count(id) from messages");
|
||||
|
|
|
|||
|
|
@ -18,10 +18,10 @@ using System.Diagnostics.CodeAnalysis;
|
|||
using Catalogger.Backend.Cache;
|
||||
using Catalogger.Backend.Cache.InMemoryCache;
|
||||
using Catalogger.Backend.Extensions;
|
||||
using OneOf;
|
||||
using Remora.Discord.API;
|
||||
using Remora.Discord.API.Abstractions.Objects;
|
||||
using Remora.Discord.API.Abstractions.Rest;
|
||||
using Remora.Discord.API.Objects;
|
||||
using Remora.Rest.Core;
|
||||
using Guild = Catalogger.Backend.Database.Models.Guild;
|
||||
|
||||
|
|
@ -109,7 +109,7 @@ public class WebhookExecutorService(
|
|||
}
|
||||
|
||||
var attachments = files
|
||||
.Select<FileData, OneOf.OneOf<FileData, IPartialAttachment>>(f => f)
|
||||
.Select<FileData, OneOf<FileData, IPartialAttachment>>(f => f)
|
||||
.ToList();
|
||||
|
||||
if (embeds.Count == 0 && attachments.Count == 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue