Skip to main content

EF: Dynamic DBContext

This library contains a slightly different dbcontext implementation than our typical three-layer dbcontext library.

We've created a library that fits the following use cases:

  • Provides an Entity Framework DbContext.
  • Works with these backends:
    • MSSQL
    • Postgres
    • SQLite
    • In-Memory
  • Compatible with NET Core 5, 6, and 7.
  • Makes use of reflection where possible, to avoid hard 

Project Info

The GitHub repo is here: https://github.com/ogauto/OGA.DynamicDomain.Lib

The JIRA page is here: 

The Jenkins Job is here: http://192.168.1.200:8080/job/oga-jobs/job/Libraries/job/Build-OGA.DynamicDomain.Lib/

Capabilities

Here are the capabilities of this library.

Included Backend Provider

This library implements the backend database provider, via reflection.

What this does is, it allows the base library, itself, to contain the backend-specific, boilerplate logic, that is normally in the top-level of the regular dbcontext implementation.

EF Logging

This library implements a method of EF logging that allows us to hook into EF events and filter for ones of log-able interest, that are sunk to our existing NLog logging.

Details are on this page: EF: Logging