假设我有这个类定义:
[Flags]
enum Permissions
{
Read = 0,
Write = 1,
Execute = 2
}
class User
{
public string Name { get;set; }
public Permissions Permissions { get;set; }
}
然后以多个权限存储用户实例。
有没有办法按权限查询用户?
dbGet<User>(x=>x.Permissions.....) // what goes as a predicate?