You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Example leaves off ApplicationContext property of IVersionTableMetaData. Worse yet, the property is marked Obsolete so it's quite unclear what should happen here. A cryptic error while attempting to implement says use DI instead but DI of what? Using .Services.AddSingleton<IConventionSet>(new DefaultConventionSet(defaultSchemaName: "myschema", workingDirectory: null)) with Sql Server doesn't set the schema for version table to myschema, instead defaultSchemaName attempts to set the database!
This page needs an example that works. I tried digging through the code to make a PR and fix but it's unclear what the developer was attempting so it's hard to make any meaningful fix.
The text was updated successfully, but these errors were encountered:
Set-up your own in-process runner where you register dependencies, rather than using dotnet-fm CLI tool or the legacy CLI, etc.
In the in-process runner, you can add constructors to your Migrations and have those migrations take an IApplicationContext dependency that can be whatever you want - the type does not even need to be called IApplicationContext.
The reason Application Context is obsolete is that it doesn't make sense to have it as a property when you could have a strongly typed thing you inject instead. The Context is typically dynamic/external resource, like an IConfiguationService. Additional things that are not Saga-like appplication context state that you might want to inject include your database access layer / library. For examples, NHibernate, EFCore, Dapper, RepoDB.
What problem are you trying to solve?
Using .Services.AddSingleton<IConventionSet>(new DefaultConventionSet(defaultSchemaName: "myschema", workingDirectory: null)) with Sql Server doesn't set the schema for version table to myschema, instead defaultSchemaName attempts to set the database!
I have not looked into this claim, this is a documentation repo, not the code repo. Did you look at how FluentMigrator.DotNet.Cli registers convention sets?
https://github.com/fluentmigrator/documentation/blob/master/articles/version-table-metadata.md
Example leaves off
ApplicationContext
property of IVersionTableMetaData. Worse yet, the property is marked Obsolete so it's quite unclear what should happen here. A cryptic error while attempting to implement says use DI instead but DI of what? Using.Services.AddSingleton<IConventionSet>(new DefaultConventionSet(defaultSchemaName: "myschema", workingDirectory: null))
with Sql Server doesn't set the schema for version table tomyschema
, insteaddefaultSchemaName
attempts to set the database!This page needs an example that works. I tried digging through the code to make a PR and fix but it's unclear what the developer was attempting so it's hard to make any meaningful fix.
The text was updated successfully, but these errors were encountered: