我试图提取这个表达式:
t => t.DayEnd == s.DayEnd && t.DayStart == s.DayStart
进入名为expression的外部变量。
我希望它以某种方式提取它,以便我可以在下一个 BlToolkit LINQ 查询中使用这个变量。
private void InsertOrUpdate(IQueryable<CccPricingPricedDays> source, Table<CccPricingPricedDays> target)
{
Expression<Func<CccPricingPricedDays,CccPricingPricedDays, bool>> expression = (s,t) => t.DayEnd == s.DayEnd && t.DayStart == s.DayStart;
//doplneni chybejicich
source.Where(s => !target.Any(t => t.DayEnd == s.DayEnd && t.DayStart == s.DayStart))
.Insert(target, table => table);
}
我可以找到一种插入变量的方法,以便对其进行编译。