예제 #1
0
        private static void SetupResources()
        {
            var componentRegistrar = new ComponentRegistrar(Container)
            {
                DatabaseOptionsBuilder = new DbContextOptionsBuilder <GreetingDbContext>()
                                         .UseSqlite(SqliteConnectionString)
            };

            componentRegistrar.RegisterApplicationComponents();
        }
예제 #2
0
        private static void SetupResources(IConfiguration configuration)
        {
            var componentRegistrar = new ComponentRegistrar(Container)
            {
                DatabaseOptionsBuilder = DatabaseOptionsBuilderFactory
                                         .CreateDatabaseOptionsBuilder(configuration["connectionString"])
            };

            componentRegistrar.RegisterApplicationComponents(configuration);
        }