I am learning and working on CQRS with MediatR. It gives an oppurtunity to have clean architecture.
So to put all my validation out of my UI I try to use FluentValidation (https://github.com/JeremySkinner/FluentValidation).
But I could not find the way to use it with Entity Framework migrations in documents or on google.
Is there a way?
Validations that you write in FluentValidation are just for client-side, not server-side validations, and validations you write in Fluent-API are just for defining database tables constraints.
The idea of using Fluent-API + Fluent-Validation instead of DataAnnotations is that you separated Client-Side Validation and Server-Side table constraints.
This video will also help you to get the idea.