mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-01-15 15:48:03 +00:00
21 lines
623 B
C#
21 lines
623 B
C#
using System;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
|
using Microsoft.EntityFrameworkCore.Metadata.Conventions;
|
|
|
|
namespace Jellyfin.Database.Providers.Sqlite;
|
|
|
|
internal class DoNotUseReturningClauseConvention : IModelFinalizingConvention
|
|
{
|
|
/// <inheritdoc/>
|
|
public void ProcessModelFinalizing(
|
|
IConventionModelBuilder modelBuilder,
|
|
IConventionContext<IConventionModelBuilder> context)
|
|
{
|
|
foreach (var entityType in modelBuilder.Metadata.GetEntityTypes())
|
|
{
|
|
entityType.UseSqlReturningClause(false);
|
|
}
|
|
}
|
|
}
|