Models Generator Abstraction #12245
mroberts91
started this conversation in
Features and ideas
Replies: 1 comment
-
PR open for this change #12210 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It would be great if we could add an abstraction around the
Infrastructure.ModelsBuilder.Building.ModelsGenerator
to be able to override the concrete class with modified implementation and still request it from Dependency Injection.For some edge cases that we have seen, we are able to take advantage of injecting additional interfaces in our generated models that allow the models to have access to distributed extension methods in NuGet packages.
There could be some additional abstractions made to
TextBuilder
and other classes in theInfrastructure.ModelsBuilder.Building
namespace but the lightest set of changes would just be adding anIModelsGenerator
interface toModelsGenerator
.Currently, the concrete
ModelsGenerator
is injected into:ModelsBuilderDashboardController
AutoModelsNotificationHandler
We are able to get around the fact that there is a concrete class being injected by hijacking requests made to the
ModelsBuilderDashboardController
and use our overridingModelsGenerator
to generate the models with the additional functionality, but it would be great to not have to intercept those requests.Beta Was this translation helpful? Give feedback.
All reactions