protected static Dictionary <string, string> GetColumnMap(Type entityType) { ObjectWalker walker = new ObjectWalker(); Dictionary <string, string> propMap = new Dictionary <string, string>(); foreach (IObjectMemberContext member in walker.Walk(entityType)) { EntityFieldDatabaseMappingAttribute map = AttributeUtils.GetAttribute <EntityFieldDatabaseMappingAttribute>(member.Member); if (map != null) { propMap.Add(member.Member.Name, map.ColumnName); } } return(propMap); }
private static Dictionary <string, PropertyInfo> LoadMap(Type entityType) { ObjectWalker walker = new ObjectWalker(); Dictionary <string, PropertyInfo> propMap = new Dictionary <string, PropertyInfo>(); foreach (IObjectMemberContext member in walker.Walk(entityType)) { EntityFieldDatabaseMappingAttribute map = AttributeUtils.GetAttribute <EntityFieldDatabaseMappingAttribute>(member.Member); if (map != null) { propMap.Add(map.ColumnName, member.Member as PropertyInfo); } } return(propMap); }