本文介绍了使用抢劫/大规模访问存储过程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

另一篇很棒的文章由Rob在大型ORM 中进行.我找不到的是关于如何访问存储过程的参考. SubSonic 在使用ActiveRecords的开销方面存在一些问题,因此我更喜欢使用存储过程进行数据访问,但仍使用亚音速ORM.

Another great article by Rob on the Massive ORM. What I haven't been able to find is references on how to access stored procedures. SubSonic had some issues with the overhead of using ActiveRecords, so I preferred to do data access with stored procedures, still using the SubSonic ORM.

我还没有看到对ORM中的SQL Server TVP之类的东西的完全支持,所以我修改后的SubSonic (无耻的插件)来支持它们.

What I haven't yet seen is outright support for things like SQL Server's TVP's in an ORM, so I modified SubSonic (shameless plug) to support them.

是否可以通过Massive访问SQL Server sproc.其次,有TVP支持吗?

Is it possible to access SQL Server sprocs with Massive. Secondly, is there TVP support?

推荐答案

不特别支持存储过程,但是因为您可以使用Massive基本上执行任何SQL,所以它们只能工作:

Stored procedures are not specially supported, but because you can execute basically any SQL with Massive they will just work:

大规模更新2 文章中的示例:

var orders = tbl.Query("CustOrdersOrders @0", "ALFKI");
foreach (var item in orders) {
    Console.WriteLine(item.OrderID);
}

如果您的主要重点是存储过程,那么甚至还会有一篇Micro ORM比较文章:用于.NET的MicroORM:存储过程

And if your main focus is on stored procedures there is even a Micro ORM comparison article about it: MicroORMs for .NET: Stored Procedures

这篇关于使用抢劫/大规模访问存储过程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-14 05:43