version 1.0.2005.1 final (self-servicing)
VS2005 asp.net 2.0
hiya,
I have some code that successfully returns product info if I supply the categoryId:
IPredicateExpression filtProductCategory = new PredicateExpression();
filtProductCategory.Add(CskStoreProductCategoryMapFields.CategoryId == 1);
dalHamilton.TypedListClasses.TListPromoProductsTypedList tListPromoProducts = new TListPromoProductsTypedList();
IRelationCollection relationsToUse = tListPromoProducts.BuildRelationSet();
relationsToUse.Add(dalHamilton.EntityClasses.CskStoreProductEntity.Relations.CskStoreProductCategoryMapEntityUsingProductId);
TypedListDAO dao = DAOFactory.CreateTypedListDAO();
dao.GetMultiAsDataTable(tListPromoProducts.BuildResultset(), tListPromoProducts, 3, null, filtProductCategory, relationsToUse, false, null, null, 0, 0);
Good so far, however, I want to find the categoryId using the categoryGUID of tblCategory.
Schema:
CSK_Store_Category
categoryId PK
categoryGUID
CSK_Store_Product_Category_Map
productID PK
categoryId PK
Can I do the above with the code that I have, or do I have to make an additional call to the database, so that I can obtain the "categoryId" via the categoryGUID arg?
please let me know if I should clarify anything.
cheers,
yogi