Groups
Groups
Sign in
Groups
Groups
NBear Google Group
Conversations
About
Send feedback
Help
如何在自定义查询里使用枚举值
0 views
Skip to first unread message
私奔
unread,
Dec 19, 2006, 9:07:36 PM
12/19/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
比如例子里的这个查询
[CustomQuery("{IsHidden} = 1", RelationType=typeof(UserGroup),
OrderBy="{ID} DESC")]
Group[] DivingGroups
{
get;
set;
}
如果IsHidden 是个自定义的枚举,那么能把{IsHidden} = 1
这个条件改成
类似于{IsHidden} = IsHidden.Hidden 的形式么?
就是想在条件里直接使用枚举值
Teddy
unread,
Dec 19, 2006, 9:11:25 PM
12/19/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
不行,因为.net的attribute的属性值规定必须是常量,所以是不能用枚举或包含计算的表达式的。
Reply all
Reply to author
Forward
0 new messages