Accessing stored procedures with robconery / massive?
Asked Answered
B

1

7

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.

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.

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

Blackburn answered 16/3, 2012 at 14:48 Comment(0)
T
10

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

Sample from the Massive Update 2 article:

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

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

Teletypewriter answered 17/3, 2012 at 22:48 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.