public static void Initialize( IServiceCollection services, BootstrapperOptions options) { services.AddTransient(x => new IdeasContext(options.ConnectionString, options.DatabaseName)); services.AddTransient <IIdeaRepository, IdeaRepository>(); }
public static void Initialize(IServiceCollection services, BootstrapperOptions options) { services.AddTransient(x => new DbContext(options.ConnectionString, options.DatabaseName)); services.AddTransient <DbContext>(x => new DbContext( options.ConnectionString, options.DatabaseName)); services.AddTransient <IJewelryRepositorycs, JewelryRepository>(); }