private static void SetupResources() { var componentRegistrar = new ComponentRegistrar(Container) { DatabaseOptionsBuilder = new DbContextOptionsBuilder <GreetingDbContext>() .UseSqlite(SqliteConnectionString) }; componentRegistrar.RegisterApplicationComponents(); }
private static void SetupResources(IConfiguration configuration) { var componentRegistrar = new ComponentRegistrar(Container) { DatabaseOptionsBuilder = DatabaseOptionsBuilderFactory .CreateDatabaseOptionsBuilder(configuration["connectionString"]) }; componentRegistrar.RegisterApplicationComponents(configuration); }