var products =db.AFM_Product.
AsEnumerable()
.Where(m=>m.ProductName.Contains(str_Product))
.OrderBy(
m => int.Parse(m.ProductID)).ToList();
//需要把productID轉成int來排序時
var query = from Parts in db.AFM_Product.
AsEnumerable()
where Parts.UnitPathId==str_UnitPathId
where Parts.ProductName.Contains(str_ProductName)
orderby int.Parse(Parts.ProductID)
select Parts;
沒有留言:
張貼留言