public void ConfigureServices(IServiceCollection services) { services.AddScoped <UserContext>(); services.AddHttpContextAccessor(); services.AddMemoryCache(); _srvRegistration = new ServiceRegistrationHelper(Configuration, services, _env, _serviceInfo); _srvRegistration.Configure(); _srvRegistration.AddControllers(); _srvRegistration.AddJWTAuthentication(); _srvRegistration.AddAuthorization <PermissionHandlerLocal>(); _srvRegistration.AddCors(); _srvRegistration.AddHealthChecks(); _srvRegistration.AddEfCoreContext(); _srvRegistration.AddMongoContext(); _srvRegistration.AddCaching(); _srvRegistration.AddSwaggerGen(); }
public void ConfigureServices(IServiceCollection services) { services.AddScoped <UserContext>(); services.AddAutoMapper(typeof(AdncUsrProfile)); services.AddHttpContextAccessor(); _srvRegistration = new ServiceRegistrationHelper(Configuration, services, _env, _serviceInfo); _srvRegistration.Configure(); _srvRegistration.AddControllers(); _srvRegistration.AddJWTAuthentication(); _srvRegistration.AddAuthorization(); _srvRegistration.AddCors(); _srvRegistration.AddHealthChecks(); _srvRegistration.AddMqHostedServices(); _srvRegistration.AddEfCoreContext(); _srvRegistration.AddMongoContext(); _srvRegistration.AddCaching(); _srvRegistration.AddSwaggerGen(); }
public void ConfigureServices(IServiceCollection services) { services.AddScoped <UserContext>(); services.AddAutoMapper(typeof(AdncWarehouseProfile)); services.AddHttpContextAccessor(); _srvRegistration = new ServiceRegistrationHelper(_cfg, services, _env, _serviceInfo); _srvRegistration.Configure(); _srvRegistration.AddControllers(); _srvRegistration.AddJWTAuthentication(); _srvRegistration.AddAuthorization <PermissionHandlerRemote>(); _srvRegistration.AddCors(); _srvRegistration.AddHealthChecks(); _srvRegistration.AddEfCoreContext(); _srvRegistration.AddMongoContext(); _srvRegistration.AddCaching(); _srvRegistration.AddSwaggerGen(); _srvRegistration.AddAllRpcServices(); _srvRegistration.AddAllEventBusSubscribers(); }
public void ConfigureServices(IServiceCollection services) { ServiceCollection = services; services.AddScoped <UserContext>(); services.AddAutoMapper(typeof(AdncMaintProfile)); services.AddHttpContextAccessor(); _srvRegistration = new ServiceRegistrationHelper(Configuration, services, _env, _serviceInfo); _srvRegistration.Configure(); _srvRegistration.AddControllers(); _srvRegistration.AddJWTAuthentication(); _srvRegistration.AddAuthorization <PermissionHandlerRemote>(); _srvRegistration.AddCors(); _srvRegistration.AddHealthChecks(); _srvRegistration.AddEfCoreContext(); _srvRegistration.AddMongoContext(); _srvRegistration.AddCaching(); _srvRegistration.AddSwaggerGen(); _srvRegistration.AddAllMqServices(); _srvRegistration.AddAllRpcServices(); services.AddConsulServices(_srvRegistration.GetConsulConfig()); }