Example #1
0
        public object[] GetKeyValues()
        {
            List <object> list     = new List <object>();
            var           primarys = ModelInfoProvider.getFiledsByAttribute(this.GetType(), typeof(KeyAttribute));

            foreach (var p in primarys)
            {
                list.Add(Property(p.Name));
            }
            return(list.ToArray());
        }
Example #2
0
        public PropertyInfo getIdentify()
        {
            var fs = ModelInfoProvider.getFiledsByAttribute(this.GetType(), typeof(IdentifyAttribute));

            return(fs.FirstOrDefault());
        }
Example #3
0
 public PropertyInfo[] getPrimaryKeys()
 {
     return(ModelInfoProvider.getFiledsByAttribute(this.GetType(), typeof(KeyAttribute)));
 }