R – Is it worth use ORM with Stored Procedures

.net-3.5ormstored-procedures

My company's polices forces to use only stored procedures (SP) to talk with DB
(no dynamic execution of SELECT, VIEWS on app side available)
Business objects (BO) are fetched from DB.
There is implemented simple BO-DB mapper using SQL Reader and this seems working well.

Form DB side we have one parametrized SPs for each Business Object one SP for all CRUD operations, switched by @MODE parameter)
So we don't have separate SP like SP_INSERT, SP_UPDATE, SP_SELECT etc …

I have read recently lot about linq2SQL, nHibernate, Subsonic etc and those look very interesting.
I noticed main ORM's benefit is flexible queries execution / filtering directly from c# code – in my word I cannot execute such (only SP allowed…)

SO, I'm wondering
– if it is worth to use ORM in my environment?
– can you mention any benefits?
– if so – what ORM you can recommend

What's your view?

Best Answer

f it is worth to use ORM in my environment?

IMHO, probably not. ORMs focus on the object model and essentially try and treat the database as a dumb store or data. You probably have business logic contained in your stored procedures, which is somewhat counter to the general principles (or at least conventions).

In the very least you'll probably have manual mapping of your objects to and from the stored procedures.