Пример #1
0
        protected RestController()
        {
            PostValidator   = new ResourceValidator <TResource>();
            PutValidator    = new ResourceValidator <TResource>();
            SharedValidator = new ResourceValidator <TResource>();

            PutValidator.RuleFor(r => r.Id).ValidId();
        }
Пример #2
0
        protected RestModule(string modulePath)
            : base(modulePath)
        {
            ValidateModule();

            PostValidator   = new ResourceValidator <TResource>();
            PutValidator    = new ResourceValidator <TResource>();
            SharedValidator = new ResourceValidator <TResource>();
        }