/// <summary> /// Loads a collection of MemberSmartTag objects from the database. /// </summary> /// <returns>A collection containing all of the MemberSmartTag objects in the database.</returns> public static MemberSmartTagCollection LoadCollection(string spName, SqlParameter[] parms) { MemberSmartTagCollection result = new MemberSmartTagCollection(); using (SqlDataReader reader = SqlHelper.Default.ExecuteReader(spName, parms)) { while (reader.Read()) { MemberSmartTag tmp = new MemberSmartTag(); tmp.LoadFromReader(reader); result.Add(tmp); } } return(result); }
/// <summary> /// Loads a MemberSmartTag object from the database using the given where clause /// </summary> /// <param name="whereClause">The filter expression for the query</param> /// <returns>A MemberSmartTag object</returns> public static MemberSmartTag LoadWhere(string whereClause) { SqlParameter[] parameterValues = new SqlParameter[] { new SqlParameter("@WhereClause", whereClause) }; using (SqlDataReader reader = SqlHelper.Default.ExecuteReader("spMemberSmartTag_SelAll", parameterValues)) { if (reader.Read()) { MemberSmartTag result = new MemberSmartTag(); result.LoadFromReader(reader); return(result); } else { return(null); } } }
/// <summary> /// Loads a MemberSmartTag object from the database using the given SmartTagId /// </summary> /// <param name="smartTagId">The primary key value</param> /// <returns>A MemberSmartTag object</returns> public static MemberSmartTag Load(Guid smartTagId) { SqlParameter[] parameterValues = new SqlParameter[] { new SqlParameter("@SmartTagId", smartTagId) }; using (SqlDataReader reader = SqlHelper.Default.ExecuteReader("spMemberSmartTag_SelRec", parameterValues)) { if (reader.Read()) { MemberSmartTag result = new MemberSmartTag(); result.LoadFromReader(reader); return(result); } else { return(null); } } }