// This method gets called by the runtime. Use this method to add services to the container. public IServiceProvider ConfigureServices(IServiceCollection services) { services.SetupConfiguration(Configuration); services.InstallServicesIn(Configuration, PlatformUtils.GetAllAssemblies("EventManagement.Installers.Tools").Concat( PlatformUtils.GetAssembliesBasedOn <Startup>())); var runtimeAssemblies = PlatformUtils.GetAllAssemblies(Program.AppName).ToArray(); return(services.AddAutofacService(Container, runtimeAssemblies)); }
// This method gets called by the runtime. Use this method to add services to the container. public IServiceProvider ConfigureServices(IServiceCollection services) { services.SetupConfiguration(Configuration); services.AddControllers(); services.InstallServicesIn(Configuration, PlatformUtils.GetAllAssemblies("EventManagement.Installers.Tools").Concat( PlatformUtils.GetAssembliesBasedOn <Startup>())); var runtimeAssemblies = PlatformUtils.GetAllAssemblies(Program.AppName).ToArray(); var modules = new List <IModule> { new StandardModule(runtimeAssemblies), new MediatorModule(runtimeAssemblies) }; return(services.AddAutofacService(Container, runtimeAssemblies, modules)); }