Closed jbogard closed 5 years ago
@davidfowl could you either merge or close this? @natemcmaster is going to move this to the mondo repo and moving PRs are tricky. Thanks.
I vote the first ;)
On Wed, Oct 17, 2018 at 5:10 PM Murat Girgin notifications@github.com wrote:
@davidfowl https://github.com/davidfowl could you either merge or close this? @natemcmaster https://github.com/natemcmaster is going to move this to the mondo repo and moving PRs are tricky. Thanks.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/aspnet/DependencyInjection/pull/635#issuecomment-430807377, or mute the thread https://github.com/notifications/unsubscribe-auth/AAGYMmYawtJ75SkkLOCwE5HqlfhY_6lSks5ul6rJgaJpZM4TNU2C .
We would like to get this feature in for 3.0 but in a bit different shape (I managed to convince @davidfowl to catch first chance exceptions). It means, unfortunately, this PR would have to be closed and reopened against new repo.
I’ll reopen on the new repo when it shows up then.
On Wed, Oct 17, 2018 at 5:44 PM Pavel Krymets notifications@github.com wrote:
We would like to get this feature in for 3.0 but in a bit different shape (I managed to convince @davidfowl https://github.com/davidfowl to catch first chance exceptions). It means, unfortunately, this PR would have to be closed and reopened against new repo.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/aspnet/DependencyInjection/pull/635#issuecomment-430815017, or mute the thread https://github.com/notifications/unsubscribe-auth/AAGYMkd2XRmpyv0YNhE4UyvaP6W9UHG3ks5ul7K1gaJpZM4TNU2C .
Thanks @jbogard!
first chance exceptions are the 👿. We should do what we can in ns2.0 and ask for new APIs in corefx to make it possible to avoid throwing.
@davidfowl I agree but this is what every container developer has had to deal with. May be easier now to expose the APIs now.
(again)
See #471 for details. Figured I'd give this another shot.
The general scenario is:
Suppose I have some interface,
IRepository<T>
. This interface allows me to save an entity to a database, perhaps wrapping EFCoreDbContext
. As part of saving, I want to validate so I haveIValidator<T>
.The implementation
DbContextRepository<T>
uses an enumerable ofIValidator<T>
to validate:I want to be able to support:
instead of
For the reasons in #471.
In case anything has changed, just wanted to throw this out there. I modified the approach to do what Autofac does, which is actually check the constraints if they exist (instead of the previous try-catch-swallow approach).