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