private string GetRelationTable(Type type1, Type type2) { string table1 = MetaDataHelper.GetTableName(type1); string table2 = MetaDataHelper.GetTableName(type2); return(table1 + '_' + table2); }
internal MetaData(Type type) { RelationColumns = new Dictionary <string, PropertyEx>(StringComparer.OrdinalIgnoreCase); Properties = new Dictionary <string, PropertyEx>(StringComparer.OrdinalIgnoreCase); var typeAttr = TypeDescriptor.GetAttributes(type); var arrs = TypeDescriptor.GetProperties(type); TableName = MetaDataHelper.GetTableName(type); for (int idx = 0; idx < arrs.Count; idx++) { var prop = PropertyEx.Create(arrs[idx]); Properties[prop.Name] = prop; if (prop is IDProperty) { KeyColumn = (IDProperty)prop; } } }
private string GetReferenceID(Type type) { return(MetaDataHelper.GetTableName(type) + "Id"); }