예제 #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);
        }
예제 #2
0
 private void Install(IServiceCollection services)
 {
     MockInstaller.Install(services); //todo
     BlInstaller.Install(services);
     DALInstaller.Install(services);
 }