-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
35 lines (31 loc) · 894 Bytes
/
Program.cs
File metadata and controls
35 lines (31 loc) · 894 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using System;
using Microsoft.Extensions.DependencyInjection;
using Serilog;
namespace StorageToMongo
{
class Program
{
static void Main(string[] args)
{
try
{
// initialize program
var startup = new Startup();
// prepare migration
var migration = startup.ServiceCollection.GetRequiredService<Migration>();
// test run
// TODO: grab table names from args
var task = migration.Run();
var awaiter = task.GetAwaiter();
awaiter.GetResult();
}
catch (Exception e)
{
Log.Error(e,"Exception in Main");
}
Console.WriteLine();
Console.Write("Press any key to exit");
Console.ReadKey();
}
}
}