public static DataTable GetAllProductsInCategory(string categoryId) { // get a configured DbCommand object DbCommand comm = GenericDataAccess.CreateCommand(); // set the stored procedure name comm.CommandText = "GetAllProductsInCategory"; // create a new parameter DbParameter param = comm.CreateParameter(); param.ParameterName = "@CategoryID"; param.Value = categoryId; param.DbType = DbType.Int32; comm.Parameters.Add(param); // execute the stored procedure and save the results in a DataTable DataTable table = GenericDataAccess.ExecuteSelectCommand(comm); return table; }