我正在寻找这个dll,但无法在任何地方找到它?有谁知道从哪里得到它可以帮助我?谢谢!
我有这些方法:
public int count(
Guid companyId, Expression<Func<T, bool>> isMatch)
{
var filters = new Expression<Func<T, bool>>[]{
x => x.PriceDefinition.CompanyId == companyId,
isMatch
};
return GetCount(filters);
}
public virtual int GetCount(
IEnumerable<Expression<Func<T, bool>>> filters)
{
IQueryable<T> _query = ObjectSet;
if (filters != null)
{
foreach (var filter in filters)
{
_query = _query.Where(filter);
}
}
return _query.Count();
}
Run Code Online (Sandbox Code Playgroud)
使用时:
count(some_guid, x => x.IsMatch(entityId, inviterId, routeId, luggageTypeId));
Run Code Online (Sandbox Code Playgroud)
我得到以下异常:
LINQ to Entities does not recognize the method 'Boolean IsMatch(System.Nullable`1[System.Int64], System.Nullable`1[System.Int64], System.Nullable`1[System.Int64], System.Nullable`1[System.Int64])' method, …Run Code Online (Sandbox Code Playgroud)