Simplify.EntityFramework 1.2.0

dotnet add package Simplify.EntityFramework --version 1.2.0
                    
NuGet\Install-Package Simplify.EntityFramework -Version 1.2.0
                    
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="Simplify.EntityFramework" Version="1.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Simplify.EntityFramework" Version="1.2.0" />
                    
Directory.Packages.props
<PackageReference Include="Simplify.EntityFramework" />
                    
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 Simplify.EntityFramework --version 1.2.0
                    
#r "nuget: Simplify.EntityFramework, 1.2.0"
                    
#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 Simplify.EntityFramework@1.2.0
                    
#: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=Simplify.EntityFramework&version=1.2.0
                    
Install as a Cake Addin
#tool nuget:?package=Simplify.EntityFramework&version=1.2.0
                    
Install as a Cake Tool

Simplify.EntityFramework Documentation

Simplifies Entity Framework Core connection configuration by building SQL Server connection strings from Simplify-style database connection settings.

Available at NuGet as binary package

Database Connection Settings

The DatabaseConnectionSettings configuration section describes the database connection:

{
  "DatabaseConnectionSettings": {
    "ServerName": "localhost",
    "DataBaseName": "MyDatabase",
    "UserName": "sa",
    "UserPassword": "password",
    "ShowSql": "false",
    "Port": "1433"
  }
}

ServerName, DataBaseName, and UserName are required — a missing value throws DatabaseConnectionConfigurationException. UserPassword, ShowSql, and Port are optional.

These are mapped to the DbConnectionSettings class:

public class DbConnectionSettings
{
    public string ServerName { get; protected set; }
    public string DataBaseName { get; protected set; }
    public string UserName { get; protected set; }
    public string UserPassword { get; protected set; }
    public bool ShowSql { get; protected set; }
    public int? Port { get; protected set; }
}

ConfigurationBasedDbConnectionSettings is an IConfiguration-based implementation that loads and validates these values from a configuration section.

Building a Connection String

SettingsBasedConnectionString builds a SQL Server connection string from the settings:

// Builds the connection string from a configuration section (default section: "DatabaseConnectionSettings").
public static string Build(IConfiguration configuration, string configSectionName = "DatabaseConnectionSettings");

// Builds the connection string from a DbConnectionSettings instance.
public static string Build(DbConnectionSettings settings);

Usage Example

public class MyDbContext(IConfiguration configuration) : DbContext
{
    protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
    {
        var connectionString = SettingsBasedConnectionString.Build(configuration);
        optionsBuilder.UseSqlServer(connectionString);
    }
}

Exceptions

// Thrown when the database connection configuration is missing or incomplete.
public sealed class DatabaseConnectionConfigurationException : Exception;

// General Simplify.EntityFramework related exception.
public class SimplifyEntityFrameworkException : Exception;
Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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 Simplify.EntityFramework:

Package Downloads
Simplify.Repository.EntityFramework

Simplify.Repository EntityFramework implementation

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.2.0 63 8/18/2026
1.1.0 236 10/11/2025
1.0.0 752 1/14/2024
1.0.0-pre03 294 4/26/2023
1.0.0-pre02 1,103 11/11/2022
1.0.0-pre01 542 1/24/2022