private Dictionary <PropertyInfo, int> GetAttributeToColumnOrdinalMapping(DbContext dbContext, Type entityType, SqlCeResultSet resultSet, Dictionary <string, string> columnMapping) { var ordinalMapping = new Dictionary <PropertyInfo, int>(); SqlCeUpdatableRecord rec = resultSet.CreateRecord(); foreach (var mappingEntry in columnMapping) { ordinalMapping.Add(entityType.GetProperty(mappingEntry.Key), rec.GetOrdinal(mappingEntry.Value)); } return(ordinalMapping); }