how to use canonical functions in Entity Framework and Mysql

c# entity-framework entity-framework-6 mysql

Accepted Answer

ZZZ_tmp
2
5/15/2015 8:50:52 AM

Popular Answer

Because the AddMinutes method is a component of the DateTime class, you can utilize a DateTime class object, such as.

DateTime dateNow = new DateTime.Now;
dateNow.AddMinutes(someminutes);

DbFunctions. AddMinutes (expression, number) Only LINQ to Entities queries are permitted to contain this function (https://msdn.microsoft.com/en-us/library/dn220081(v=vs.113).aspx):

Context.Train.Where(x => EntityFunctions.AddMinutes(x.Start, 10) > DateTime.Now)


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow