Why is the method Group.GetGroupsBySQL removed in DW8 or is just moved?
The Product.GetProductBySql still exists in DW8.
Best regards
//Magnus
Why is the method Group.GetGroupsBySQL removed in DW8 or is just moved?
The Product.GetProductBySql still exists in DW8.
Best regards
//Magnus
Hi Magnus,
I wondered about that too. However, if you don't need any joins and stuff like that then you can just query the cached groups by using linq...
using System.Linq; using Dynamicweb.eCommerce.Products; var selectedGroups = (from Group g in Group.GetAllGroups() where g.Number.StartsWith("X") select g).ToList();
You can also access a subset of groups through an instance of Shop or Product if that is what you need.
/Morten
Hi both
It is still there. It is a static method with 2 overloads on the Products type:
Dynamicweb.eCommerce.Products.Product.GetProductBySql("select * from ecomproducts");
Oh, my bad. Group.GetGroupsBySql
It has been removed due to caching issues. The groups are now persisted in cache and you have to use the GetAllGroups method.
The Groups are related to Shops and languages and that is why the BySql method has been deprecated.
Also, the methods had been marked as Obsolete in the API since July 30th 2009, and were therefore completely removed with the restructuring in the DW8 API.
You must be logged in to post in the forum