public override void ConfigureServices(IServiceCollection services) { base.ConfigureServices(services); var startupOrderHelper = StartupOrderHelper.Instance(); services.AddSingleton <IStartupOrderHelper>(sp => startupOrderHelper); services.AddSingleton <StartupOrderHelper>(sp => startupOrderHelper as StartupOrderHelper); var dbContextHelper = DbContextHelper.Instance; dbContextHelper.AddSupportSqlServer(); dbContextHelper.AddSupportMySql(); services.AddSingleton(dbContextHelper); }
public IStartupOrderHelper GetStartupOrderHelper() { return(StartupOrderHelper.Instance()); }