Exemple #1
0
        /// <summary>
        /// Loads a collection of InternetTag objects from the database.
        /// </summary>
        /// <returns>A collection containing all of the InternetTag objects in the database.</returns>
        public static InternetTagCollection LoadCollection(string spName, SqlParameter[] parms)
        {
            InternetTagCollection result = new InternetTagCollection();

            using (SqlDataReader reader = SqlHelper.Default.ExecuteReader(spName, parms))
            {
                while (reader.Read())
                {
                    InternetTag tmp = new InternetTag();
                    tmp.LoadFromReader(reader);
                    result.Add(tmp);
                }
            }
            return(result);
        }
Exemple #2
0
 /// <summary>
 /// Loads a InternetTag object from the database using the given where clause
 /// </summary>
 /// <param name="whereClause">The filter expression for the query</param>
 /// <returns>A InternetTag object</returns>
 public static InternetTag LoadWhere(string whereClause)
 {
     SqlParameter[] parameterValues = new SqlParameter[] { new SqlParameter("@WhereClause", whereClause) };
     using (SqlDataReader reader = SqlHelper.Default.ExecuteReader("spInternetTag_SelAll", parameterValues))
     {
         if (reader.Read())
         {
             InternetTag result = new InternetTag();
             result.LoadFromReader(reader);
             return(result);
         }
         else
         {
             return(null);
         }
     }
 }
Exemple #3
0
 /// <summary>
 /// Loads a InternetTag object from the database using the given TagId
 /// </summary>
 /// <param name="tagId">The primary key value</param>
 /// <returns>A InternetTag object</returns>
 public static InternetTag Load(Guid tagId)
 {
     SqlParameter[] parameterValues = new SqlParameter[] { new SqlParameter("@TagId", tagId) };
     using (SqlDataReader reader = SqlHelper.Default.ExecuteReader("spInternetTag_SelRec", parameterValues))
     {
         if (reader.Read())
         {
             InternetTag result = new InternetTag();
             result.LoadFromReader(reader);
             return(result);
         }
         else
         {
             return(null);
         }
     }
 }