本文整理汇总了C#中Select.ExecuteTypedList方法的典型用法代码示例。如果您正苦于以下问题:C# Select.ExecuteTypedList方法的具体用法?C# Select.ExecuteTypedList怎么用?C# Select.ExecuteTypedList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Select
的用法示例。
在下文中一共展示了Select.ExecuteTypedList方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: get_orders_by_houseBL
public IList<Int32> get_orders_by_houseBL(string housebl)
{
IList<Int32> _orders = null;
try
{
string[] _cols = { "OrderTable.OrderNumber" };
SubSonic.SqlQuery _qry = new SubSonic.SqlQuery();
_qry = new Select(_cols).From(OrderTable.Schema).
Where(OrderTable.HouseBLNUmberColumn).IsEqualTo(housebl);
_orders = _qry.ExecuteTypedList<Int32>();
}
catch (Exception ex)
{
string _error = ex.Message.ToString();
}
return _orders;
}
示例2: NativeMaterializeTest
protected override void NativeMaterializeTest(int count)
{
var query = new Select().From("Simplests");
int i = 0;
while (i < count)
foreach (var o in query.ExecuteTypedList<Simplest>())
if (++i >= count)
break;
}
示例3: Collection_LoadCustomProperties
public void Collection_LoadCustomProperties() {
SubSonic.SqlQuery q = new
Select(Product.ProductIDColumn, Category.CategoryNameColumn)
.From(Product.Schema)
.InnerJoin<Category>()
.OrderAsc(Product.ProductIDColumn.QualifiedName);
// Old behaviour
List<Product> result = q.ExecuteTypedList<Product>();
Assert.AreEqual(null, result[0].CategoryName);
Assert.AreEqual(1, result[0].ProductID);
// New behaviour
result = q.ExecuteTypedList<Product>(true);
Assert.AreEqual("Beverages", result[0].CategoryName);
Assert.AreEqual(1, result[0].ProductID);
}
示例4: NativeQueryTest
protected override void NativeQueryTest(int count)
{
for (int i = 0; i < count; i++) {
var id = i % InstanceCount;
var query = new Select().From("Simplests").Where("Id").IsEqualTo(id);
foreach (var simplest in query.ExecuteTypedList<Simplest>()) {
// Doing nothing, just enumerate
}
}
}