Skip to content

fix: gitignore macOS file systems and scoped client serializer extension #784

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
Jun 18, 2020

Conversation

maurei
Copy link
Member

@maurei maurei commented Jun 16, 2020

@maurei maurei requested a review from bart-degreed June 16, 2020 13:28
Copy link
Contributor

@bart-degreed bart-degreed left a comment

Choose a reason for hiding this comment

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

Looks good to me. Alternatively, we can register IResourceFactory as a singleton as well.

@maurei
Copy link
Member Author

maurei commented Jun 18, 2020

@bart-degreed I think I would prefer that. However, DefaultResourceFactory depends on IServiceProvider, which currently is a scoped service provided because IResourceFactory is scoped. Registering it as a singleton will result in IServiceProvider being the root service provider, from which no scoped services can directly be resolved. This might cause problems right here, what do you think?

@bart-degreed
Copy link
Contributor

Good point, that is going to cause problems indeed. Because what typically will be injected as a resource parameter is DbContext, which is scoped. Sounds like we'll need to make them all scoped then, which is what you initially proposed.

@maurei maurei merged commit 9d7614f into master Jun 18, 2020
@maurei maurei deleted the fix/scope-client-serializers branch June 18, 2020 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

AddClientSerialization should register (de)serializers as scoped services
2 participants