Ejemplo n.º 1
0
        private void loadRecordSets(IDataReader reader)
        {
            recordSets  = new Dictionary <Type, DbRecords>();
            rootRecords = loadRecords(typeof(T), reader);
            int i = 0;

            while (reader.NextResult() && i < dependenciesTypes.Length)
            {
                Type      type      = dependenciesTypes[i++];
                DbRecords dbRecords = loadRecords(type, reader);
                recordSets.Add(type, dbRecords);
            }
        }
Ejemplo n.º 2
0
        private void mapRecordSets(DbRecords dbRecords)
        {
            Dictionary <Type, MemberInfo> childs = dbRecords.RecordInfo.Childs;

            foreach (KeyValuePair <Type, MemberInfo> child in childs)
            {
                Type childRecordType = child.Key;

                if (recordSets.ContainsKey(childRecordType))
                {
                    DbRecords records = recordSets[childRecordType];
                    DbRecordsMapper.Map((object[])dbRecords.List, (object[])records.List);
                }
            }
        }