Skip to content
Patrick edited this page Oct 19, 2016 · 4 revisions

onfiguration.EntityFramework

For .NET Framework & .NET Core

.NET Core supports a variety of different configuration options. Application configuration data can come from files using built-in support for JSON, XML, and INI formats, as well as from environment variables, command line arguments or even an in-memory collection. So why is there no support for EntityFramework? Well now there is!

Configuration.EntityFramework is a custom configuration provider for the .NET Core Configuration system. It's built on EntityFrameworkCore allowing configuration settings to be stored in a wide variety of repositories, including;

  • Microsoft SQL Server,
  • SQLite,
  • Npgsql (PostgreSQL),
  • MySQL (Official),
  • Pomelo (MySQL),
  • Microsoft SQL Server Compact Edition,
  • IBM Data Servers,
  • InMemory (for Testing),
  • Devart (MySQL, Oracle, PostgreSQL, SQLite, DB2, SQL Server, and more),
  • Oracle (Coming Soon).

Build Status

configuration-entityframework MyGet Build Status

Why use Configuration.EntityFramework?

Some settings, such as a connection string or those required during the initialisation of an application may be better located in a local file rather than a repository. However, in many cases Configuration.EntityFramework can present some distinct advantages, including;

  1. Makes use of the .NET Core configuration provider model,
  2. Support for complex types,
  3. Access settings in a strongly typed fashion using the [Options pattern] (https://docs.asp.net/en/latest/fundamentals/configuration.html#options-config-objects),
  4. Enhanced Configuration Management and Change Control. This is particularly relevant to a distributed environment,
  5. Transactional update of settings for whole of environment,
  6. Common settings can be shared among many applications. Support for single point of change,
  7. In a complex system with many related applications or services it's not uncommon to have many configuration files. By persisting settings to a database, the dependency on these configuration files can be reduced,
  8. All settings for a select criteria, such as environment, application or section can be retrieved with a single query,
  9. Allow end users to update settings via the EntityFramework Context.

Compatibility

Configuration.EntityFramework is compatible with .NET Core and .NET 4.6.2 or greater.

So what now?

How about some Use Cases for Configuration.EntityFramework?

How do I Get Started with Configuration.EntityFramework?

Where can I find latest NuGet package for Configuration.EntityFramework?