Combine BinaryExpression and Expression<Func<dynamic, bool>> in C#
问题 How can I combine BinaryExpression and Expression<Func<dynamic / T, bool>> ? For example: void AddGlobalFilter<T>(Expression<Func<T, bool>> expr) { var parameter = Expression.Parameter(type, "t"); var member = Expression.Property(filter.Parameter, field); var constant = Expression.Constant(null); var body = Expression.Equal(member, constant); var combine = Expression.AndAlso(body, expr); } I am trying to define global filter for Entity Framework (EF) Core. The problem is I must manually