初めて比較してみたDateTime
var searchResult = new PagedData<SAMPLE_STOCK>
{
Data = _db.SAMPLE_STOCK.Where(m => m.LAST_UPDATED.Date == lastUpdate.Date)
};
return PartialView(searcReasult);
次のエラーが発生します
The specified type member 'Date' is not supported in LINQ to
Entities. Only initializers, entity members, and entity navigation
properties are supported.
次に、次のコードを記述します
var searchResult = new PagedData<SAMPLE_STOCK>
{
Data = _db.SAMPLE_STOCK.Where(m => m.LAST_UPDATED.Day == lastUpdate.Day
&& m.LAST_UPDATED.Month == lastUpdate.Month
&& m.LAST_UPDATED.Year==lastUpdate.Year)
};
それは正常に動作します。私の質問は..これらの違いは何ですか??