-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy pathProgram.cs
27 lines (25 loc) · 956 Bytes
/
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
using Beef.Database;
using Beef.Database.SqlServer;
using System.Threading.Tasks;
namespace Beef.Demo.Database
{
public class Program
{
static Task<int> Main(string[] args) => SqlServerMigrationConsole
.Create("Data Source=.;Initial Catalog=Beef.Test;Integrated Security=True;TrustServerCertificate=true", "Beef", "Demo")
.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>();
args.AddSchemaOrder("Sec", "Ref", "Demo");
args.IncludeExtendedSchemaScripts();
return args;
}
}
}