ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,158 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Im working on a API. In the domain layer, I have a method Public UserModel GetUser(int id)
. If the user is not found i want to return a 404. the issue is im supposed to return a UserModel
how is validations done in the domain layer in Clean Architecture?
If i validate everything in controller i could get away with it just fine, but how can it be done in the Domain Layer?
You would have a class that's in the Models folder the controller calls the method on the class.