public StudentRegistrationService( IPeopleService peopleService, IPopulationService populationService, IUserService userService, IMapper mapper, ISMSDbContextGenericRepository <StudentInformation> studentRepo, IEMPublisher eventPublisher ) { _peopleService = peopleService; _populationService = populationService; _userService = userService; _mapper = mapper; _studentRepo = studentRepo; _eventPublisher = eventPublisher; }
public void Setup() { var services = new ServiceCollection(); services.AddEMDefaultManager(opt => { opt.CheckIsEventUnique = true; }) .UseSQLChecker(sql => sql.UseSqlServer("Data Source=LAPTOP-3O58F4FN;database=eventDB;trusted_connection=yes;")); //.UseWebApiChecker(opt => //{ // opt.BaseUrl = ""; //}); var provider = services.BuildServiceProvider(); provider.InitializeEMDefaultManager("localhost"); _eventPublisher = provider.GetService <IEMPublisher>(); }