Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add .WithVersionTable<VersionTable>() DI Helper #1431

Open
jzabroski opened this issue Feb 22, 2021 · 0 comments
Open

Add .WithVersionTable<VersionTable>() DI Helper #1431

jzabroski opened this issue Feb 22, 2021 · 0 comments
Labels
area-DependencyInjection improvement Improvement of behavior or code quality

Comments

@jzabroski
Copy link
Collaborator

Or, IMHO, a more elegant option would be to add a .WithVersionTable<VersionTable>() function. The implementation of this function would be something simple like:

        public static IMigrationRunnerBuilder WithVersionTable<T>(
            this IMigrationRunnerBuilder builder) where T:IVersionTableMetaData
        {
            builder.Services
                .AddScoped<IVersionTableMetaDataAccessor, T>();
            return builder;
        }

Originally posted by @mabead in #1429 (comment)

@schambers schambers added the improvement Improvement of behavior or code quality label Mar 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-DependencyInjection improvement Improvement of behavior or code quality
Projects
None yet
Development

No branches or pull requests

2 participants