By edict, we’re using stored procedures for all interactions with our database.
By organizational directive, we’re using table value parameters in some of these stored procedures, specifically the ones I need to use.
By legal edict, we can’t use nHibernate or anything under LGPL (though, if necessary, we can fight back on that).
Are there any OR/M (object-relational mapper) frameworks out there that support table value parameters into stored procedures?
I’ve already investigated the crap out of Linq to Sql and Entity Framework v1, and I know that it’s fundamentally not supported now, and L2Sql will probably never support it.
Anything out there, commercial or free? I really don’t want to write hundreds of lines of boilerplate to decode the results.
So, write your own, at least for these stored procedures.
Are there so many of them?
It’s way to late for me to try this, but you can: take one of your stored procedures. Create a new typed
DataSetin Visual Studio. Drag this SP from Server Explorer onto the design surface. See whether the parameters collection is correctly updated.I’m not suggesting this as your ORM technology, only as an experiment to see whether table-valued parameters are supported by this designer (and, presumably by the designer for
SqlCommand,SqlDataAdapter, etc).If it works, then it gives you at least a bad way of quickly generating the code you’d need in an ORM: copy the code from the dataset.designer.cs file into your own code.
It’s then possible, if you really need to know, to figure out what the
DataSetDesigner is using to pick up the parameters – you could then use it yourself, in your own code generation.