Groups
Groups
Sign in
Groups
Groups
NBear Google Group
Conversations
About
Send feedback
Help
用Gateway那个方法可以实现?求表一字段的最小值.
0 views
Skip to first unread message
小鱼儿
unread,
Dec 4, 2006, 2:58:27 AM
12/4/06
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to NBear Google Group
用Gateway那个方法可以实现?求表一字段的最小值.
比如我想求商品表商品的最低价格.
public interface Product
{
[PrimaryKey]
int Id
{
get;
}
int price
{
get;
set;
}
string Name
{
get;
set;
}
}
查寻返回一个Product
Teddy
unread,
Dec 4, 2006, 3:05:23 AM
12/4/06
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to nbear...@googlegroups.com
可以先用object minPrice = Gateway.Min<Product>(WhereClip.All, Product._.price)获得最小的价格,再用Gateway.Find<Product>(Product._.price == minPrice);得到这个Product。
Teddy
Reply all
Reply to author
Forward
0 new messages