Пример #1
0
        private static LIS_PEDIDOMARCCollection ExecuteReader(ref LIS_PEDIDOMARCCollection collection, ref FbDataReader dataReader, FbCommand dbCommand)
        {
            using (dataReader = dbCommand.ExecuteReader())
            {
                collection = new LIS_PEDIDOMARCCollection();

                if (dataReader.HasRows)
                {
                    while (dataReader.Read())
                    {
                        collection.Add(FillEntityObject(ref dataReader));
                    }
                }

                if (!(dataReader.IsClosed))
                {
                    dataReader.Close();
                }
                dataReader.Dispose();
            }

            return(collection);
        }