C
C#7mo ago
Core

How to structure interfaces and their implementations

Hi, Which project structure is more common? Or is there any other used in practice? 1
ClassLib/
|
|-- Interfaces
| |- IOrder
| | -IPayment
|
|-- Implementations
| |- Order
| |- Payment
ClassLib/
|
|-- Interfaces
| |- IOrder
| | -IPayment
|
|-- Implementations
| |- Order
| |- Payment
2.
ClassLib/
|
|-- Orders
| |- IOrder
| |- Order
|
|-- Payments
| |- IPayment
| |- Payment
ClassLib/
|
|-- Orders
| |- IOrder
| |- Order
|
|-- Payments
| |- IPayment
| |- Payment
4 Replies
Angius
Angius7mo ago
Assuming you even need interfaces there, I prefer the latter
Pobiega
Pobiega7mo ago
Second one is better
Core
CoreOP7mo ago
Thank you, I will migrate to the 2 :)) I had a feeling my choice was not the best How should I name the folder in which I group the interface and implementation? For example: UserRepository and IUserRepository, how should I name the parent folder?
Angius
Angius7mo ago
The former That is what's important about it after all
Want results from more Discord servers?
Add your server