private static List <ORM_HEC_CMT_CommunityGroup> Search(Query query, string connectionString, DbConnection connection, DbTransaction transaction) { CSV2Core.Core.Interfaces.IManagedConnection managedConnection = new CSV2Core_MySQL.MySQLManagedConnection(); List <ORM_HEC_CMT_CommunityGroup> items; try { managedConnection.set(connectionString, connection, transaction); var loader = new CSV2Core_MySQL.Dictionaries.MultiTable.Loader.DictionaryLoader(managedConnection.getConnection(), managedConnection.getTransaction()); DbCommand command = managedConnection.manage(query.CreateSelectQuery(TableName)); query.SetParameters(command); items = new List <ORM_HEC_CMT_CommunityGroup>(); var reader = new CSV2Core_MySQL.Support.DBSQLReader(command.ExecuteReader()); reader.SetOrdinals(new string[] { "HEC_CMT_CommunityGroupID", "HealthcareCommunityGroupITL", "Community_RefID", "CommunityGroup_Name_DictID", "CommunityGroup_Description_DictID", "CommunityGroupCode", "IsPrivate", "Creation_Timestamp", "Tenant_RefID", "IsDeleted", "Modification_Timestamp" }); while (reader.Read()) { ORM_HEC_CMT_CommunityGroup item = new ORM_HEC_CMT_CommunityGroup(); //0:Parameter HEC_CMT_CommunityGroupID of type Guid item.HEC_CMT_CommunityGroupID = reader.GetGuid(0); //1:Parameter HealthcareCommunityGroupITL of type String item.HealthcareCommunityGroupITL = reader.GetString(1); //2:Parameter Community_RefID of type Guid item.Community_RefID = reader.GetGuid(2); //3:Parameter CommunityGroup_Name of type Dict item.CommunityGroup_Name = reader.GetDictionary(3); loader.Append(item.CommunityGroup_Name, TableName); //4:Parameter CommunityGroup_Description of type Dict item.CommunityGroup_Description = reader.GetDictionary(4); loader.Append(item.CommunityGroup_Description, TableName); //5:Parameter CommunityGroupCode of type String item.CommunityGroupCode = reader.GetString(5); //6:Parameter IsPrivate of type Boolean item.IsPrivate = reader.GetBoolean(6); //7:Parameter Creation_Timestamp of type DateTime item.Creation_Timestamp = reader.GetDate(7); //8:Parameter Tenant_RefID of type Guid item.Tenant_RefID = reader.GetGuid(8); //9:Parameter IsDeleted of type Boolean item.IsDeleted = reader.GetBoolean(9); //10:Parameter Modification_Timestamp of type DateTime item.Modification_Timestamp = reader.GetDate(10); item.Status_IsAlreadySaved = true; item.Status_IsDirty = false; items.Add(item); } reader.Close(); loader.Load(); managedConnection.commit(); } catch (Exception ex) { managedConnection.rollback(); throw; } return(items); }