コード例 #1
0
        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);
        }
コード例 #2
0
        protected virtual bool IsValid(ZOperationResult operationResult, string entity)
        {
            ModelState.AddOperationResults(operationResult, entity);

            return(ModelState.IsValid);
        }