我對IQueryable有疑問。請勿在IQueryable中選擇特定項目
如何刪除/不選擇IQueryable中的項目。
我的代碼返回一個IQueryable與這些實體列表。
{
"ResourceId": "FirstName",
"LanguageId": "ENG",
"Client": NULL,
"ResourceText": "first name x"
}
{
"ResourceId": "FirstName",
"LanguageId": "ENG",
"Client": 1,
"ResourceText": "first name y"
}
{
"ResourceId": "LastName",
"LanguageId": "ENG",
"Client": NULL,
"ResourceText": "last name"
}
{
"ResourceId": "BirthDate"
"LanguageId": "ENG"
"Client": NULL
"ResourceText": "date of birth"
}
如果存在與特定的客戶端(不爲空),用於同一RESOURCEID我想刪除與客戶端== NULL
對於上述示例的實體的實體的結果應該是
{
"ResourceId": "FirstName",
"LanguageId": "ENG",
"Client": 1,
"ResourceText": "first name y"
}
{
"ResourceId": "LastName",
"LanguageId": "ENG",
"Client": NULL,
"ResourceText": "last name"
}
{
"ResourceId": "BirthDate"
"LanguageId": "ENG"
"Client": NULL
"ResourceText": "date of birth"
}
THX對您有所幫助
這個問題還不夠清楚,你的意思是你在內存列表中有這個,並且你想對它做一個linq查詢嗎? –