public Account Save(Account entity) { ; var errorList = new List <ValidationFailure>(); SetLogInfo(entity); var errorEntity = AccountValidator.GetInstance().Validate(entity); errorList.AddRange(errorEntity.Errors); if (errorList.Count != 0) { throw new SpadException(string.Join(",", errorList.Select(s => s.ErrorMessage))); } var result = _repository.Save(entity); return(entity); }