FUNCTION database.AddDays does not exist

夙愿已清 提交于 2021-02-07 18:17:26

问题


I'm trying to use dbfunction from EF6 on database MySQL but I get the follow exception "FUNCTION database.DiffDays does not exist".

I used this code:

var aux = bd.Atos.Where(w => w.IdAtivo == 1 && w.IdUtilizador == idUtilizador && DbFunctions.DiffDays(DbFunctions.AddDays(w.Data, w.NumDias).Value, DateTime.Now).Value < numeroDias)

What I'm missing?

来源:https://stackoverflow.com/questions/24442260/function-database-adddays-does-not-exist

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!