OptimusLog.DataAccess.EFCore 2.0.1

dotnet add package OptimusLog.DataAccess.EFCore --version 2.0.1
                    
NuGet\Install-Package OptimusLog.DataAccess.EFCore -Version 2.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="OptimusLog.DataAccess.EFCore" Version="2.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OptimusLog.DataAccess.EFCore" Version="2.0.1" />
                    
Directory.Packages.props
<PackageReference Include="OptimusLog.DataAccess.EFCore" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add OptimusLog.DataAccess.EFCore --version 2.0.1
                    
#r "nuget: OptimusLog.DataAccess.EFCore, 2.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package OptimusLog.DataAccess.EFCore@2.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=OptimusLog.DataAccess.EFCore&version=2.0.1
                    
Install as a Cake Addin
#tool nuget:?package=OptimusLog.DataAccess.EFCore&version=2.0.1
                    
Install as a Cake Tool

OptimusLog.DataAccess.EFCore

Entity Framework Core implementation for the Optimus Log data access layer. Provides bulk insert with GZip compression, in-memory settings cache, entity configurations, and database seeder.

Features

  • Bulk Insert: RepoApilog using EFCore.BulkExtensions for high-performance batch inserts
  • GZip Compression: Param and Response fields are compressed before storage and decompressed on retrieval
  • In-Memory Cache: RepoApiLogSetting with static in-memory settings cache for fast access
  • Entity Configurations: Fluent API mappings for ApiLog, ApiLogGroup, ApiLogType, ApiLogSetting (Core schema)
  • Database Seeder: ApiLogUnitOfWorkInitializer seeds default log groups, types, and settings

Key Classes

Class Description
RepoApilog BulkInsert with GZip compression, thread-safe with lock
RepoApiLogSetting In-memory cache with lazy initialization and reload
IApiLogUnitOfWork DbSet access for ApiLog, ApiLogGroup, ApiLogType, ApiLogSetting
ApiLogUnitOfWorkInitializer Seeds 4 groups, 4 types, and default exclusion rules
ApiLogConfig Fluent API mapping for ApiLog entity

Installation

dotnet add package OptimusLog.DataAccess.EFCore

Usage

using OptimusLog.DataAccess.EFCore;

// Register in your DbContext
public class MyDbContext : UnitOfWorkEF, IApiLogUnitOfWork
{
    public DbSet<ApiLog> ApiLogs { get; set; }
    public DbSet<ApiLogGroup> ApiLogGroups { get; set; }
    public DbSet<ApiLogType> ApiLogTypes { get; set; }
    public DbSet<ApiLogSetting> ApiLogSettings { get; set; }

    protected override void OnModelCreating(ModelBuilder modelBuilder)
    {
        base.OnModelCreating(modelBuilder);
        modelBuilder.ApplyConfiguration(new ApiLogConfig());
    }
}

// Seed initial data
ApiLogUnitOfWorkInitializer.Seed(modelBuilder);
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on OptimusLog.DataAccess.EFCore:

Package Downloads
OptimusLog.AppService

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.1 117 2/18/2026
2.0.0 115 2/18/2026