我有以下课程:
class Operation
{
User User_AssignedTo;
ResourceGroup ResourceGroup;
}
class ResourceGroup
{
List<User> UsersCollection;
}
而且我有方法。它接受用户和返回操作。像这样的东西:
ResourceGroup resourceGroup = null;
query = conn.Session.QueryOver<Operation>()
.JoinAlias(item => item.ResourceGroup, () => resourceGroup)
.Where(item => item.User_AssignedTo.Id == user.Id || resourceGroup.UsersCollection.Contains(userDm));
但我有例外
Unrecognised method call: System.Collections.Generic.ICollection`1[[Mapping.Classes.User, Mapping.Classes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=8ab89f53b66a52c3]]:Boolean Contains