Как я сравниваю время только DateTime объекта без получения следующихLinq To Sql сравнить время только
Ошибка:
An exception of type 'System.NotSupportedException' occurred in mscorlib.dll but was not handled in user code Additional information: The specified type member 'TimeOfDay' is not supported in LINQ to Entities. Only initializers, entity members, and entity navigation properties are supported.
Мой код:
var date = DateTime.Parse(query.DueTime);
entities = entities.Where(r => r.DueTime.TimeOfDay.Equals(date.TimeOfDay));
я не получаю DbFunctions. Это дает мне ошибку «Имя DbFunctions не существует в текущем контексте». Должен ли я использовать любое пространство имён? –
Я использую структуру сущности 5. –