// Dependancy and services configuration public IServiceProvider ConfigureServices(IServiceCollection services) { // Adding MVC (including WebAPI) services.AddMvc(); // In production, the Angular files will be served from this directory services.AddSpaStaticFiles(configuration => { configuration.RootPath = "ClientApp/dist"; }); // Adding asp.net services provider to global Autofac DI container AutofacContainer container = new AutofacContainer(); return(container.BuildContainer(services)); }
private static bool InitializeApplicationData() { var result = false; AutofacContainer ac = new AutofacContainer(); var container = ac.BuildContainer(); var appManagerObj = container.GetService(typeof(IApplicationManager)); if (appManagerObj != null && appManagerObj is IApplicationManager) { ((IApplicationManager)appManagerObj).DataInitialization(); result = ((IApplicationManager)appManagerObj).DataInitialized; } return(result); }