Skip to content

Auto Load Configurations for EntityFrameworkCore

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE
Unknown
COPYING.txt
Notifications You must be signed in to change notification settings

davidrevoledo/EntityFrameworkCore.AutoLoad

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EntityFrameworkCore.AutoLoad

Auto Load Configurations for EntityFrameworkCore

AutoLoad

This is an add-in for EntityFrameworkCore

Allow to use same configurations existing in EntityFramework 6 to auto load configurations.

Build status CodeFactor License: MIT NuGet NuGet

Nuget package

To Install from the Nuget Package Manager Console

PM > Install-Package EntityFrameworkCore.AutoLoad 
NET CLI - dotnet add package EntityFrameworkCore.AutoLoad
paket paket add EntityFrameworkCore.AutoLoad

Available here https://www.nuget.org/packages/EntityFrameworkCore.AutoLoad/#

Usage

Just call it from OnModelCreating in DbContext class it will read all your configuratons where they implement IEntityTypeConfiguration

 public class TestContext : DbContext
    {
        public TestContext(DbContextOptions<TestContext> options)
            : base(options)
        {
        }

        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            modelBuilder.AddFromAssembly(typeof(TestContext).Assembly);
            base.OnModelCreating(modelBuilder);
        }
    }

Sample here Usage

Icon

Created by Mariana Alemanno

Made with ❤ in DGENIX

About

Auto Load Configurations for EntityFrameworkCore

Resources

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE
Unknown
COPYING.txt

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages