I want to get all the events which are not ended yet
select * FROM [Events] where EndDate+cast(EndTo as datetime)>GETDATE()
which is working perfectly.
This is my value in (EndTo: 11:00:00.0000000, END DATE: 2016-05-26
)
I tried using
var list = dbContext.Events
.Where(e => e.EndDate + e.EndTo > DateTime.Now)
.ToList();
and I'm getting an error
DbArithmeticExpression arguments must have a numeric common type.
How can I write this query in Entity Framework?