public static void RegisterServices(IServiceCollection services) { services.AddSingleton <IRequestManager, InMemoryRequestManager>(); // Application services.AddSingleton(Mapper.Configuration); services.AddScoped <IMapper>(sp => new Mapper(sp.GetRequiredService <IConfigurationProvider>(), sp.GetService)); UserInjector.RegisterServices(services); services.AddScoped <DatabaseContext>(); // Infra - Data EventSourcing }
public UserProcessor(DataService dataService, UserService userService, UserInjector injector) : base(dataService) { UserService = userService; Injector = injector; }