Skip to content

ServiceGovernance/ServiceGovernance.Registry.EntityFramework

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));
        });
}