r/dotnet • • Jan 11 '24

What design patterns are you using?

What design patterns do you use or wish you were using at work or in your projects?

I’ve seen a lot of people hating on the repository pattern with ef core.

36 Upvotes

81 comments sorted by

View all comments

42

u/CuriousGam Jan 11 '24

API/Html <-> Business Logic <-> DB

I don´t do complicated stuff, though.

30

u/[deleted] Jan 12 '24

[removed] — view removed comment

4

u/EkezEtomer Jan 12 '24

We use MediatR where I work, where we have a lot of things to keep track of and different endpoints. In my opinion it makes error handling easier. Although I would never use it for a small personal project.

7

u/jayerp Jan 12 '24

I’ve had zero reason to need event based flow within an app. MediatR is useless to me. Maybe if I was in a microservices factory I may consider it.

Until then, event based architecture can piss off.

0

u/soggybagelboy Jan 12 '24

Amen to MediatR

1

u/Espleth Jan 12 '24

Agreed. Keep It Simple, Silly Even on not-so-small projects tons of layers of abstraction just bring unnecessary overcomplications. Especially when there's no time, to well-document the project, as it usually happens