/// <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)); }
public static Hashtable GetNonKeyAttributeMemberInfos(Type type) { return(DomainObjectUtility.GetNonKeyAttributeMemberInfos(DomainObjectUtility.GetTableMapAttribute(type), DomainObjectUtility.GetMemberInfos(type))); }
public static Hashtable GetNonKeyAttributeMemberInfos(object obj) { return(DomainObjectUtility.GetNonKeyAttributeMemberInfos(DomainObjectUtility.GetTableMapAttribute(obj), DomainObjectUtility.GetMemberInfos(obj))); }
public static TableMapAttribute GetTableMapAttribute(object obj) { return(DomainObjectUtility.GetTableMapAttribute(obj.GetType())); }