Festiis / NurediniCargoAPI

MIT License
0 stars 0 forks source link

🔨 Refactoring: Implement BaseController for common CRUD Operations #2

Open Festiis opened 8 months ago

Festiis commented 8 months ago

Refactoring Request: Implement BaseController for CRUD Operations

Description

The current implementation of CRUD operations on Goods, Supplier, and Warehouse involves duplicated code across controllers, each utilizing the same RepositoryBase and inheriting from EntityBase. This refactoring request proposes creating a common BaseController to encapsulate shared functionality and eliminate code redundancy.

Affected Entities

Suggested Changes

Implement a generic BaseController<T> that handles common CRUD operations for entities inheriting from EntityBase. This approach promotes code reuse and maintenance efficiency.

Additional Information

Festiis commented 8 months ago

Only reason it was not implemented from the start was that swagger did not display any endpoints for generic controllers.