Our great sponsors
-
ASP.NET Core
ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
Hi, I am using asp.net Core 6 and making an ordering web app (for learning purposes). My web app is connected to a database and I also have 4 tables. Problem is, I only have 1 controller and I have too many dependencies in it also it makes it hard for me to test it. So I am looking for some ways I could refactor my class.
You can follow a "controller per endpoint" strategy. One good way to do it is with Steve Smith ApiEndpoints: https://github.com/ardalis/ApiEndpoints