I’m going through the documentation https://docs.servicestack.net/create-your-first-webservice and https://docs.servicestack.net/validation.
Since the goal is to have all the Dto’s in the ServiceModel Project and keep this dependency-free in which project should the Fluent Validators be kept?
For example, the documentation says:
Building functionality around POCOs - You can use the same POCO in ServiceStack as a DTO, OrmLite Data Model, Cache, Session, Config, etc
I’m planning on reusing the DTO’s used for the data model in my service. In which project would you typically put the Validators? If the goal is to keep the ServiceModel Project logic and dependency-free does it mean these should be on their own Project especially considering these validators could be used in other projects outside the service?
As per the documentation, the ServiceModel Project should only reference ServiceStack.Interfaces.dll.
So adding the validators in this project would pull in more dependencies but since these validators could be used by other projects outside the service I’m not sure what’s the best approach for this.
P.s. Sorry the dto approach is kind of new for us and we have a lot of existing classes with their own constructor performing some initialization logic in our legacy project and we are kind of working backward from a more monolithic code base to our goal of having things split in services etc. and working toward clean poco that are implementation and logic free is a bit of a mental shift…