Skip to content

ServiceGovernance/ServiceGovernance.Registry.EntityFramework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ServiceGovernance.Registry.EntityFramework

Build status NuGet Version License

Persistance library for ServiceRegistry using EntityFramework.

Usage

public void ConfigureServices(IServiceCollection services)
{
    var migrationsAssembly = typeof(Startup).GetTypeInfo().Assembly.GetName().Name;

    services.AddServiceRegistry()
        // this adds the persistence to EF
        .AddRegistryStore(options =>
        {
            options.ConfigureDbContext = builder =>
                builder.UseSqlServer(Configuration.GetConnectionString("default"),
                    sql => sql.MigrationsAssembly(migrationsAssembly));
        });
}