Esempio n. 1
0
        /// <summary>
        /// 获得DomainObject对应的 数据库表名.字段名,用','拼成的字符串
        /// </summary>
        /// <param name="type">DomainObject的类型</param>
        /// <returns></returns>
        public static string GetDomainObjectFieldsStringWithTableName(Type type)
        {
            string tableName = DomainObjectUtility.GetTableMapAttribute(type).TableName;

            string[] fieldNames = (string[])DomainObjectUtility.GetDomainObjectFieldsName(type).ToArray(typeof(string));

            for (int i = 0; i < fieldNames.Length; i++)
            {
                fieldNames[i] = string.Format("{0}.{1}", tableName, fieldNames[i]);
            }

            return(String.Join(", ", fieldNames));
        }
Esempio n. 2
0
 public static Hashtable GetNonKeyAttributeMemberInfos(Type type)
 {
     return(DomainObjectUtility.GetNonKeyAttributeMemberInfos(DomainObjectUtility.GetTableMapAttribute(type), DomainObjectUtility.GetMemberInfos(type)));
 }
Esempio n. 3
0
 public static Hashtable GetNonKeyAttributeMemberInfos(object obj)
 {
     return(DomainObjectUtility.GetNonKeyAttributeMemberInfos(DomainObjectUtility.GetTableMapAttribute(obj), DomainObjectUtility.GetMemberInfos(obj)));
 }
Esempio n. 4
0
 public static TableMapAttribute GetTableMapAttribute(object obj)
 {
     return(DomainObjectUtility.GetTableMapAttribute(obj.GetType()));
 }