Minimal API example #37
-
Although there is WebAPI example, it is still not clear how to apply this pattern to modern minimal APIs. Ideally, I'd have one root and bind all the services in that composition but not sure what the proper way is. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
@Serg046 I've added an example that uses a single composition root in a minimal web application. Hopefully it will clarify the use cases. Feel free to ask questions if something is not clear, I will answer and add it to the documentation. |
Beta Was this translation helpful? Give feedback.
-
It looks weird.
Works for me in both scenarios. Have you experimented with this example? Or your own? If you have your own, please make sure your composition is defined like this. Are you able to share it? |
Beta Was this translation helpful? Give feedback.
@Serg046 I've added an example that uses a single composition root in a minimal web application. Hopefully it will clarify the use cases. Feel free to ask questions if something is not clear, I will answer and add it to the documentation.