예제 #1
0
 public PagesManagerService(AppDbContext db, IMapper mapper, UserManager <AppUser> userMgr, PageValidator validator, CacheService cache)
 {
     _db        = db;
     _mapper    = mapper;
     _userMgr   = userMgr;
     _validator = validator;
     _cache     = cache;
 }
예제 #2
0
        /// <summary>
        /// Method to validate model
        /// </summary>
        /// <returns>Returns the result of validation</returns>
        protected override FluentValidation.Results.ValidationResult Validate()
        {
            var validator = new PageValidator();

            return(validator.Validate(this));
        }
 public PageValidatorTests()
 {
     _validator = new PageValidator();
 }