-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathProgram.cs
28 lines (25 loc) · 1.02 KB
/
Program.cs
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
using Beef.Database;
using Beef.Database.SqlServer;
using System.Threading.Tasks;
namespace My.Hr.Database;
/// <summary>
/// Represents the <b>database utilities</b> program (capability).
/// </summary>
public class Program
{
/// <summary>
/// Main startup.
/// </summary>
/// <param name="args">The startup arguments.</param>
/// <returns>The status code whereby zero indicates success.</returns>
static Task<int> Main(string[] args) => SqlServerMigrationConsole
.Create("Data Source =.; Initial Catalog = My.Hr; Integrated Security = True; TrustServerCertificate = true", "My", "Hr")
.Configure(c => ConfigureMigrationArgs(c.Args))
.RunAsync(args);
/// <summary>
/// Configure the <see cref="MigrationArgs"/>.
/// </summary>
/// <param name="args">The <see cref="MigrationArgs"/>.</param>
/// <returns>The <see cref="MigrationArgs"/>.</returns>
public static MigrationArgs ConfigureMigrationArgs(MigrationArgs args) => args.AddAssembly<Program>().UseBeefSchema();
}