Exemplo n.º 1
0
        private void Install(IServiceCollection services)
        {
            services.AddHttpContextAccessor();
            services.TryAddSingleton <IHttpContextAccessor, HttpContextAccessor>();
            services.AddDbContext <PhotoBoothContext>(builder =>
            {
                builder.UseSqlServer(Configuration
                                     .GetConnectionString("DefaultConnection"))
                .UseLazyLoadingProxies();
            }, ServiceLifetime.Transient, ServiceLifetime.Singleton);

            BlInstaller.Install(services);
            DALInstaller.Install(services);
        }
Exemplo n.º 2
0
 private void Install(IServiceCollection services)
 {
     MockInstaller.Install(services); //todo
     BlInstaller.Install(services);
     DALInstaller.Install(services);
 }