How to add day to date in Linq to SQL

前端 未结 10 1144
栀梦
栀梦 2020-12-16 13:53

I am writing this code. Here dt is input into the function, as well as someint. The column Exp is a T-SQL date column, which comes as a DateTime through Linq.



        
10条回答
  •  南笙
    南笙 (楼主)
    2020-12-16 14:19

    If you are using the Entity Framework, use the System.Data.Objects.EntityFunctions as below:

    c.CMT_TS > System.Data.Objects.EntityFunctions.AddDays(e.Call.CALL_TS, 1)
    

提交回复
热议问题