-
Notifications
You must be signed in to change notification settings - Fork 10.4k
[Question] Do we have a reason to use dynamics type in OrderQueries.cs file #366
Comments
@SychevIgor However, for a public API, it would be better to use ViewModels or "contracts". Here's a longer explanation: As I said, that approach was very agile and flexible while developing, but once the app is stable and we think more in the long-term, I find that it might be safer to define explicit ViewModels (like DTOs) exposing explicit contracts. |
Closing this issue. We decided to accept the PR and use predefined ViewModel DTOs classes as it is better for public APIs but also for long term microservices, even if they are just used by the same application. |
I just started working on #305 and got an interesting situation... I can't normally describe the return type for OrderController.GetOrder because type essentially dynamic.
after some research - I didn't find any reason for dynamic type here.
May I fix the type or could you explain the idea?
@CESARDELATORRE
The text was updated successfully, but these errors were encountered: