Пример #1
0
 public static void Initialize(
     IServiceCollection services,
     BootstrapperOptions options)
 {
     services.AddTransient(x => new IdeasContext(options.ConnectionString, options.DatabaseName));
     services.AddTransient <IIdeaRepository, IdeaRepository>();
 }
Пример #2
0
        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>();
        }