NET Core activities? Where should I put business logic?

Hello, I’m NodeJS guy but I’m discovering NET Core right now.

I understand Controllers, DI etc. concepts but I wonder where I should put business logic code.

Normally, when I implement REST API in NodeJS I separate layers into REST(routes, headers etc.), activities(payload validation, business logic, external calls etc.) and database layer.

How should I implement it in NET Core? Is there a pattern for that? Should I inject some kind of “processing class” into my controller and then use it inside (like I do with DB context already…)?

You can share your concepts or link examples on GitHub or something like that.

Thank you for your help.

submitted by /u/D3kalog
[link] [comments]

Leave a Reply