Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用实体框架,我想将 LIKE 日期的 SQL 查询转换为实体框架。这是查询
Select * from Schedule where SerialNo='11119' and DueDate like '%2012%'
尝试这个:
dbcontext.Schedules.Where(s => s.SerialNo == '11119' && s.DueDate.Year == 2012)