c# - Comparing nullable datetime -


I'm trying to compare dates in your Linux query but my c.DateRequired There is a blank date field and I just want to compare the date without time. How can I go about converting c.DateRequired to get a bus date in this situation.

  IEnumerable & lt; SalesOrder & gt; SalesOrders = _uow.Repository & lt; SalesOrder & gt; (). Query () .Filter (c = & gt; c.IsDeleted! = True & amp; (((c.DateRequired == DateTime.Today.Date)) & amp; amp; period == 1) || ((c .DateRequired> gt; = sDateP & amp; amp; amp; c.DateRequired; & lt; = stDate) & amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp शब्द; 2 duration (duration == 2 || term == 3) Order By (Q = & gt; q.OrderBy (c => c.DateCreated)) .Get () Select (p = & gt; new {SalesOrder = p, SalesOrderDetailsList = p.SalesOrderDetailsList.Where (pd = & gt; pd.IsDeleted! = True), Vikryordr delete Components list = p.SalesOrderDetailsList.Select (c = & gt; c.SalesOrderDetailsComponentsList), SalesOrderDetailsComponentsInfoList = p.SalesOrderDetailsList.Select (i = & gt; i.SalesOrderDetailsComponentsList. Select (information = & gt; info.SalesOrderDetailsComponentsInfoList))}) Kolist (). Selection (P => P. Sales Order); Return Sales Order; }    

You need to use EntityFunctions.TruncateTime who accept a tap qualified datetime

  EntityFunctions.TruncateTime (x.DateRequired) == EntityFunctions.TruncateTime (DateTime.Today )    

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -