cake-contrib / cake-contrib/Cake.EntityFramework6

Where is Migrator?

Open
#5 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
1
Forks
2
PR merge metrics
No merged PRs in 30d

Description

ITNOA

When I use `Cake.EntityFramework` as you can know, I can use [EfMigrator](https://cake-contrib.github.io/Cake.EntityFramework/api/Cake.EntityFramework.Migrator/EfMigrator/) to create migration sql file and save it, or apply it as I wish, but in new EntityFramework6, I do not know how to doing like below

```
var migrationSettings = new EfMigratorSettings
{
AssemblyPath = dataProject.DllFilePath,
ConfigurationClass = "BSN.Resa.Core.Data.Migrations.Configuration",
AppConfigPath = serviceProject.Path + "/bin/app.publish/Web.config",
ConnectionString = @"Data Source=(localdb)\MSSQLLocalDB; Initial Catalog=Resa.Accounting; Integrated Security=True; MultipleActiveResultSets=True;",
ConnectionProvider = "System.Data.SqlClient"
//ConnectionName = ""
};
using (var migrator = CreateEfMigrator(migrationSettings))
{
string migrationScript = migrator.GenerateScriptForLatest();
FileWriteText(ARTIFACTS_DIRECTORY + "migration.sql", migrationScript);

migrator.MigrateToLatest();
migrator.Commit();
}
```

Where is these methods?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.