Ejemplo n.º 1
0
        /// <summary> 验证实体模型是否可用 </summary>
        public bool ModelState(object obj, out string message)
        {
            var results = ObjectPropertyFactory.ModelState(obj);

            message = results.FirstOrDefault();

            return(results.Count == 0);
        }
Ejemplo n.º 2
0
        /// <summary> 验证实体模型是否可用 </summary>
        protected bool ModelState(object obj, out string message)
        {
            var result = ObjectPropertyFactory.ModelState(obj, out List <string> errors);

            message = errors.FirstOrDefault();

            return(result);
        }
Ejemplo n.º 3
0
 public bool ModelState(out List <string> errors)
 {
     return(ObjectPropertyFactory.ModelState(this.SelectObject, out errors));
 }