Let's do the part. When you said "model coming from the request" I assume it's a Dto, a ViewModel or any name for an object that just loads attributes. It is not interesting to use these objects as your Model or Domain entities to avoid coupling the Model layer with the Controller layer. To validate this input data, you can use Data Annotation just as Nilton did.
Now thinking that we are already talking at the domain level. It is not mandatory for the Entity Framework to do validation on this subject. The obligation is your entity. Following the object-oriented paradigm, the Customer class should validate the Client class.
I recommend you use a little recognized pattern by name, but used in quite a place, which is Good Citizen Pattern. In this pattern, your object should validate if your own state is consistent , becoming a good citizen.
There are several ways to do this, for example:
-
The constructor of a class serves much more than injecting
dependency, it should be used to leave the class in a
status when possible. There will be cases where only the constructor is not enough.
-
It is common (even if not specified directly in the good citizen pattern) to make a validation contract, for example IValidated. In this case, have all classes implement a validation method, so before Entity starts to play its part, you can validate the entity and, if possible, even retrieve it if necessary.
Example:
var meuNovoCliente = new Cliente(nome: "Gabriel Coletta", idade: 23);
var clienteValido = meuNovoCliente.Validar();
if(clienteValido) {
//chamar a camada que faz o INSERT, por exemplo;
}