public static void AssignedMap <T>(T obj, DataRow row, ReturnMap <T> rMap, bool propertyNameIgnoreCase, bool skipNotExistProperty) where T : class { if (rMap == null) { return; } List <PropertyColumn> maps = rMap.GetMaps(); if (maps == null || maps.Count <= 0) { return; } foreach (PropertyColumn map in maps) { object val = row[map.Column]; if (map.PropertyList == null || map.PropertyList.Count <= 0) { continue; } else { string[] pNames = map.PropertyList.ToArray(); val = DataMapperHelper.ConvertIfEnum(val, typeof(T), pNames, propertyNameIgnoreCase, skipNotExistProperty); FillFieldValue(obj, pNames, val, propertyNameIgnoreCase, skipNotExistProperty); } } }
public static void AssignedMap <T>(T obj, DataRow row, ReturnMap <T> rMap) where T : class { AssignedMap <T>(obj, row, rMap, true, true); }
// ------------- Assigned Map Return Entity ------------ public static void AssignedMap <T>(T obj, IDataReader reader, ReturnMap <T> rMap) where T : class { AssignedMap <T>(obj, reader, rMap, true, true); }