Professional Documents
Culture Documents
16.1 Challenge 4 - Refactoring Towards The Clean Architecture PDF
16.1 Challenge 4 - Refactoring Towards The Clean Architecture PDF
Refactoring Towards the Clean Architecture
Our API is ready. However, there are two issues with the current implementation.
1- API Contract: VehicleResource works perfectly fine when creating/updating vehicles. But we
can’t use it when rendering a list of vehicles. There, we need the actual “make” and “model” of a
vehicle, not just their IDs. With the current implementation, in order to the render a list of
vehicles, we need to make a few separate API calls, get the vehicles, makes and models and
join them on the client. This is tedious and inefficient. Revisit the contract of the vehicles API to
solve this issue.
https://www.udemy.com/entity-framework-tutorial/
Dependency Injection
Use the ConfigureServices() method in the Startup class to register your interfaces and their
implementations.
services.AddScoped<IRepository, Repository>();