Esempio n. 1
0
        /// <summary>
        /// Gets <see cref="EditionTypeRow"/> by the primary key.
        /// </summary>
        /// <param name="editionType_ID">The <c>EditionType_ID</c> column value.</param>
        /// <returns>An instance of <see cref="EditionTypeRow"/> or null reference
        /// (Nothing in Visual Basic) if the object was not found.</returns>
        public virtual EditionTypeRow GetByPrimaryKey(int editionType_ID)
        {
            string     whereSql = "[EditionType_ID]=" + _db.CreateSqlParameterName("@EditionType_ID");
            IDbCommand cmd      = CreateGetCommand(whereSql, null);

            AddParameter(cmd, "@EditionType_ID", editionType_ID);
            EditionTypeRow[] tempArray = MapRecords(cmd);
            return(0 == tempArray.Length ? null : tempArray[0]);
        }
        /// <summary>
        /// Gets <see cref="ThreadDetailRow"/> by the primary key.
        /// </summary>
        /// <param name="threaddetails_ID">The <c>Threaddetails_ID</c> column value.</param>
        /// <returns>An instance of <see cref="ThreadDetailRow"/> or null reference
        /// (Nothing in Visual Basic) if the object was not found.</returns>
        public virtual ThreadDetailRow GetByPrimaryKey(int threaddetails_ID)
        {
            string     whereSql = "[Threaddetails_ID]=" + _db.CreateSqlParameterName("@Threaddetails_ID");
            IDbCommand cmd      = CreateGetCommand(whereSql, null);

            AddParameter(cmd, "@Threaddetails_ID", threaddetails_ID);
            ThreadDetailRow[] tempArray = MapRecords(cmd);
            return(0 == tempArray.Length ? null : tempArray[0]);
        }
Esempio n. 3
0
        /// <summary>
        /// Gets <see cref="MediaObjectRow"/> by the primary key.
        /// </summary>
        /// <param name="object_ID">The <c>Object_ID</c> column value.</param>
        /// <returns>An instance of <see cref="MediaObjectRow"/> or null reference
        /// (Nothing in Visual Basic) if the object was not found.</returns>
        public virtual MediaObjectRow GetByPrimaryKey(int object_ID)
        {
            string     whereSql = "[Object_ID]=" + _db.CreateSqlParameterName("@Object_ID");
            IDbCommand cmd      = CreateGetCommand(whereSql, null);

            AddParameter(cmd, "@Object_ID", object_ID);
            MediaObjectRow[] tempArray = MapRecords(cmd);
            return(0 == tempArray.Length ? null : tempArray[0]);
        }