Reputation:
I am using the following
Product objProduct = new Product("active_flag","true");
This one will result multiple row, how can I access the multple rows? ObjProduct will have only one row?
Upvotes: 0
Views: 179
Reputation: 26
Another way...
ProductCollection products = new ProductCollection()
.Where(Product.Columns.active_flag, true)
.Load();
Upvotes: 0
Reputation: 8677
If you're using 2.1 or above you can do the following:
ProductCollection products = DB.Select().From(Product.Schema)
.Where(Product.Columns.active_flag).IsEqualTo(true)
.ExecuteAsCollection<ProductCollection>();
Upvotes: 4