User1120430333 posted
I think you can unit test if you are following SoC principles in developing the solution. If you have not followed SoC, then your solution will be hard to unit test.
Separation of concerns - Wikipedia
Understanding Separation Of Concern in ASP.NET MVC (c-sharpcorner.com)
Architectural principles | Microsoft Docs
Understanding Models, Views, and Controllers (C#) | Microsoft Docs
<copied>
An MVC model contains all of your application logic that is not contained in a view or a controller. The model should contain all of your application business logic, validation logic, and database access logic. For example, if you are using the Microsoft
Entity Framework to access your database, then you would create your Entity Framework classes (your .edmx file) in the Models folder.
A view should contain only logic related to generating the user interface. A controller should only contain the bare minimum of logic required to return the right view or redirect the user to another action (flow control). Everything else should be contained
in the model.
In general, you should strive for fat models and skinny controllers. Your controller methods should contain only a few lines of code. If a controller action gets too fat, then you should consider moving the logic out to a new class in the Models folder.
<end>