Ejemplo n.º 1
0
        public void SetUp()
        {
            var services = new ServiceCollection();


            services
            .AddEntityFrameworkInMemoryDatabase()
            .AddDbContext <LailsDbContext>((serviceProvider, options) => options.UseInMemoryDatabase("LailsDbContext").UseInternalServiceProvider(serviceProvider));

            services
            .AddDbCrud <LailsDbContext>();

            var provider = services.BuildServiceProvider();


            Context     = (LailsDbContext)provider.GetService(typeof(LailsDbContext));
            CrudBuilder = (ICrudBuilder <LailsDbContext>)provider.GetService(typeof(ICrudBuilder <LailsDbContext>));
        }
Ejemplo n.º 2
0
 public LoadTestConsumer(ICrudBuilder <LailsDbContext> cRUDBuilder, LailsDbContext lailsDbContext)
 {
     _crudBuilder    = cRUDBuilder;
     _lailsDbContext = lailsDbContext;
 }