예제 #1
0
        public ValidationResult Delete(object id)
        {
            AppUserValidator validator = new AppUserValidator();
            var entity = repo.FindById(id);
            ValidationResult result = validator.Validate(entity);

            if (result.IsValid)
            {
                repo.Delete(id);
                repo.Save();
            }
            return(result);
        }