請幫忙。我不`噸明白,爲什麼從我的實體上下文實體框架神祕錯誤
var stagesExist = context.WfwDocumentWorkStages
.Any(it => it.Enabled && it.ExecutionId == execution.Id
&& it.Level == execution.Level && it.ResultId == null);
值stagesExist是假 但
var stages = context.WfwDocumentWorkStages.Where(it => it.Enabled
&& it.ExecutionId == execution.Id
&& it.Level == execution.Level).ToList();
bool stagesExist = stages.Any(it=>it.ResultId == null);
值stagesExist是真實的?
請嘗試將第一個實現中的最後一個子句更改爲'&& it.ResultId == null'。我認爲你正在用不同的值再次捕捉它...... –
這只是一個錯字 – milvus