我可以将 EF4 与 sp_msforeachdb 一起使用吗?
我有一个查询简化版本:
declare @s nvarchar(max)
set @s ='
set transaction isolation level read uncommitted
select
[db] = cast(specific_catalog as varchar(30))
,[num_procs] = count(*)
,[len_procs] = sum(len(routine_definition))
from
?.INFORMATION_SCHEMA.ROUTINES
where
ROUTINE_TYPE=''PROCEDURE''
group by
specific_catalog'
exec sp_msforeachdb @s
我可以通过强类型 EF4 对象使用它吗?自从我遇到一些让我认为我必须回到常规 ADO 的事情以来已经有一段时间了,但我不知道如何解决这个问题。
I have a query simplified version:
declare @s nvarchar(max)
set @s ='
set transaction isolation level read uncommitted
select
[db] = cast(specific_catalog as varchar(30))
,[num_procs] = count(*)
,[len_procs] = sum(len(routine_definition))
from
?.INFORMATION_SCHEMA.ROUTINES
where
ROUTINE_TYPE=''PROCEDURE''
group by
specific_catalog'
exec sp_msforeachdb @s
Can I consume this via a strongly typed EF4 object? It's been awhile since I came across something that has me thinking I have to go back to regular ADO, but I'm not sure how to tackle this one.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
IMO 这应该由常见的 ADO.NET 作为存储过程执行。原因:
IMO this is something which should be executed as stored procedure by common ADO.NET. Why: