Usenet streaming with a WebDAV server and a SABnzbd-compatible API
C#
using System.Data.Common;
using Microsoft.EntityFrameworkCore.Diagnostics;
namespace NzbWebDAV.Database.Interceptors;
public class SqliteForeignKeyEnabler : DbConnectionInterceptor
{
public override void ConnectionOpened(DbConnection connection, ConnectionEndEventData eventData)
{
using var command = connection.CreateCommand();
command.CommandText = "PRAGMA foreign_keys = ON;";
command.ExecuteNonQuery();
}
}