I have a query in Transact SQL
, and I need to modify it to LinQ
for a migration of a program I'm doing, but I've had problems specifically with a function of SQL Server
, the datediff
, with which It has been difficult for me to do it in LinQ
.
SELECT AVG(Diario) AS Expr1
FROM (SELECT SUM(VolumenTanqueo) AS Diario
FROM EQ_Tanqueo
GROUP BY FechaTanqueo
HAVING (DATEDIFF(dd, FechaTanqueo, GETDATE()) <= 100))
AS derivedt