I am using the following
我使用以下内容
Product objProduct = new Product("active_flag","true");
产品objProduct =新产品(“active_flag”,“true”);
This one will result multiple row, how can I access the multple rows? ObjProduct will have only one row?
这个会导致多行,如何访问多行? ObjProduct只有一行?
2 个解决方案
#1
If you're using 2.1 or above you can do the following:
如果您使用的是2.1或更高版本,则可以执行以下操作:
ProductCollection products = DB.Select().From(Product.Schema)
.Where(Product.Columns.active_flag).IsEqualTo(true)
.ExecuteAsCollection<ProductCollection>();
#2
Another way...
ProductCollection products = new ProductCollection()
.Where(Product.Columns.active_flag, true)
.Load();
#1
If you're using 2.1 or above you can do the following:
如果您使用的是2.1或更高版本,则可以执行以下操作:
ProductCollection products = DB.Select().From(Product.Schema)
.Where(Product.Columns.active_flag).IsEqualTo(true)
.ExecuteAsCollection<ProductCollection>();
#2
Another way...
ProductCollection products = new ProductCollection()
.Where(Product.Columns.active_flag, true)
.Load();