HernanFAR / vslices-framework

A modular framework that aims to a faster but clean and pragmatic software developtment
MIT License
1 stars 0 forks source link

Create VSlices.CrossCutting.AspNetCore.DataAnnotationMiddleware #115

Closed HernanFAR closed 2 months ago

HernanFAR commented 6 months ago

To cases where we have a rich domain model when using DDD, is important to separate Contract validation to Command validation, being the first one a syntax validation (Like nullables, string ranges, number ranges, etc.) and the second one a semantic validation (a item exist in the repository, a specific service is available, etc).

To do that, we can add AspNetCore Middlewares to do syntax validation, and IPipelineBehaviors to semantic validation inside a given use case, implies a new VSlices.CrossCutting.AspNetCore.DataAnnotationMiddleware.