protected bool ValidateModelState(ZOperationResult operationResult) { bool result = false; //ZDataDictionaryAttribute entityDictionary = repository.DataDictionary; //if (entityDictionary.IsAuto && ZPersistenceHelper.IsAutoDBMS(repository.DBMS)) //{ // foreach (string key in entityDictionary.Keys) // { // ModelState.Remove(entityDictionary.Entity + "." + key); // } //} result = ModelState.IsValid; ModelState.AddOperationResults(operationResult, typeof(TEntity).Name); return(result); }
protected virtual bool IsValid(ZOperationResult operationResult, string entity) { ModelState.AddOperationResults(operationResult, entity); return(ModelState.IsValid); }