Skip to content

[2.0.0-preview1] Remove DbContextFactoryOptions #8314

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

Merged
merged 1 commit into from
Apr 29, 2017
Merged

[2.0.0-preview1] Remove DbContextFactoryOptions #8314

merged 1 commit into from
Apr 29, 2017

Conversation

bricelam
Copy link
Contributor

Part of #8164

/// <returns> An instance of <typeparamref name="TContext" />. </returns>
TContext Create([NotNull] DbContextFactoryOptions options);
TContext Create([NotNull] string[] args);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be IEnumerable<string>?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think so.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I call ToArray in the templates or push for IEnumerable all the way down?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There might also be value in keeping an array to mirror Main and drive home the point that this is an entry point into the application

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like both WebHost.CreateDefaultBuilder and IConfigurationBuilder.AddCommandLine (which it calls) are string[]. Given that, I think we should keep it string[].

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with keeping an array for that reason.

Copy link
Contributor

@ajcvickers ajcvickers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

/// <returns> An instance of <typeparamref name="TContext" />. </returns>
TContext Create([NotNull] DbContextFactoryOptions options);
TContext Create([NotNull] string[] args);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good.

@bricelam bricelam closed this Apr 29, 2017
@bricelam bricelam deleted the args branch April 29, 2017 02:38
@bricelam bricelam merged commit 0ab838a into dotnet:rel/2.0.0-preview1 Apr 29, 2017
@bricelam bricelam changed the base branch from dev to rel/2.0.0-preview1 April 29, 2017 03:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants