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

Why don't use the injected IConfiguration in DesignTimeDbContextFactory? #1

Open
sadqiang opened this issue Feb 3, 2018 · 1 comment

Comments

@sadqiang
Copy link

sadqiang commented Feb 3, 2018

Rather than recreating

 IConfigurationRoot configuration = new ConfigurationBuilder()
                .SetBasePath(Directory.GetCurrentDirectory())
                .AddJsonFile("appsettings.json")
                .Build();

again in DesignTimeDbContextFactory.cs, can we leverage the DI just by adding a constructor and a readonly field of type IConfiguration in DesignTimeDbContextFactory?

@asadullazadeh
Copy link

asadullazadeh commented Apr 24, 2019

This opened issue long time ago created.
I think that not important because official documentation use the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants