Esempio n. 1
0
    public async Task Run()
    {
      try
      {
        Console.WriteLine("Reading Configuration");
        var builder = new ConfigurationBuilder()
         .SetBasePath(PlatformServices.Default.Application.ApplicationBasePath)
         .AddJsonFile("config.json")
         .AddEnvironmentVariables();

        _config = builder.Build();
        _ctx = new WilderContext(_config);
        _repo = new WilderBlogRepository(_config);

        Console.WriteLine("Clearing the DocumentDB Store");
        await ClearDatabase();

        Console.WriteLine("Migrating Stories");
        await MigrateStories();
        
        //TODO More migration

      }
      catch (Exception ex)
      {
        Console.WriteLine(ex.ToString());
        Console.ReadKey();
      }
    }
Esempio n. 2
0
        public void Run()
        {
            try
              {
            Console.WriteLine("Reading Configuration");
            var builder = new ConfigurationBuilder()
             .SetBasePath(PlatformServices.Default.Application.ApplicationBasePath)
             .AddJsonFile("config.json")
             .AddEnvironmentVariables();

            _config = builder.Build();
            _ctx = new OldWilderContext(_config);
            _newCtx = new WilderContext(_config);
            _repo = new WilderRepository(_config, _newCtx);

            Console.WriteLine("Migrating Stories");
            MigrateStories();

            //TODO More migration

              }
              catch (Exception ex)
              {
            Console.WriteLine(ex.ToString());
            Console.ReadKey();
              }
        }
Esempio n. 3
0
 public WilderRepository(IConfigurationRoot config, WilderContext ctx)
 {
     _ctx = ctx;
 }
Esempio n. 4
0
 public WilderInitializer(WilderContext ctx, UserManager <WilderUser> userMgr)
 {
     _ctx     = ctx;
     _userMgr = userMgr;
 }
Esempio n. 5
0
 public WilderRepository(IConfigurationRoot config, WilderContext ctx)
 {
     _ctx = ctx;
 }
Esempio n. 6
0
 public WilderRepository(WilderContext ctx)
 {
     _ctx = ctx;
 }
Esempio n. 7
0
 public WilderInitializer(WilderContext ctx, UserManager <WilderUser> userMgr, ILogger <WilderInitializer> logger)
 {
     _ctx     = ctx;
     _userMgr = userMgr;
     _logger  = logger;
 }