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