Linq such as:
var v = from l in _dal.Share where l.PingcoId == pingcoId && (l.CreateTime.Date == DateTime.Now.Date) select l;
return v.ToList();
An error will be reported: LINQ to Entities does not support the specified type member “Date”.
Change to this OK:
DateTime sdt = DateTime.Now.Date;
DateTime dt = DateTime.Now.Date.AddDays(1);
var v = from l in _dal.Share where l.PingcoId == pingcoId && (l.CreateTime >= sdt && l. CreateTime <= dt) select l;
return v.ToList();
Read More:
- [Solved] ant-design a-date-picker Error: date.locale is not a function
- How to Solve linq Statement IsNullOrWhiteSpace Error
- QtCreator Error: “member access into incomplete type QHeaderView“
- [Solved] MindSpore Error: StridedSlice operator does not support input of uint8 data type on Ascend hardware
- [Solved] swiper Error: The requested module ‘react’ is expected to be of type CommonJS, which does not support named exports. CommonJS modules can be imported by importing the default export
- [Solved] leetcode Common Error: :runtime error: member access within misaligned address 0xbebebebebebebebe for type ‘str
- How to Solve error C2039: “to_ String “: not a member of” STD “
- [Solved] VINS-MONO: integer_sequence_algorithm.h:64:21: error: ‘integer_sequence’ is not a member of ‘std’
- [Solved] error: value createSchemaRDD is not a member of org.apache.spark.sql.SQLContext
- Error: Your CLT does not support macOS 11.6 [How to Solve]
- Cmake Setting Support C++11 This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options
- Stream to MemoryStream to solve Stream.Length error report This stream does not support search operations
- Sublime text 3 does not support Chinese/[decode error – output not UTF-8] solution
- [Solved] The method getContextPath() from the type HttpServletRequest refers to the missing type String
- [Solved] error: package android.support.design.widget does not exist
- [Solved] Error while extracting response for type [] and content type []…
- [Solved] SVN error: does not support the HTTP/DAV protocol
- Error 2 error c2491: XX: definition of dllimport static data member is not allowed
- [Solved] Pytorch3d Error: RuntimeError: Not compiled with GPU support.
- [Solved] GBase 8a V95 Replace Node Error: single vc mode does not support ‘–freenode’