如何将SQL转换为实体查询. [英] How to convery SQL to Entity Query.

查看:80
本文介绍了如何将SQL转换为实体查询.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的SQl在下面,请帮助我在实体查询中对其进行转换-

My SQl is below please help me to convert it in Entity Query-

select SUM(total)
from MyTax mt1
inner join (
select Code,ID,TaxYear,Data,max(date) as FinalDate
from MyTax
group by Code,ID,TaxYear,Data) mt2
on mt1.Code = mt2.Code and mt1.ID = mt2.ID
and mt1.Data = mt2.Data and mt1.TaxYear = mt2.TaxYear
and mt1.date = mt2.date



谢谢



Thanks

推荐答案

如果查询有效,为什么不将它与直接执行存储命令 [
If the query works, why don''t you just use it with the ExecuteStoreCommand[^] method?

Hee is a bit more info:Directly Executing Store Commands[^]

Best regards
Espen Harlinn


这篇关于如何将SQL转换为实体查询.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆