❔ FluentValidation DTO
Hello, lets say I have a dto like this:
When the user supplies a request, if he doesn't supply center id it will be auto initialized to 0, making it impossible to detect if he even supplied that property
The solution is making the property nullable and checking if .NotNull()
however then IDE cries for nullables so we come to this:
Is this the correct way to setup DTOs?
When the user supplies a request, if he doesn't supply center id it will be auto initialized to 0, making it impossible to detect if he even supplied that property
The solution is making the property nullable and checking if .NotNull()
however then IDE cries for nullables so we come to this:
Is this the correct way to setup DTOs?