Can subsonic generation for me CRUD and stored procedure paging?

Can subsonic help me build these basic stored procedures?

Can I change its template so that it will generate these SPs?

Where to start learning?

0


a source to share


2 answers


As of version 2, you can probably edit the templates to create SP build scripts, but that would be far from a trivial task. And of course, you will need to add functionality to execute scripts, clean up the previous generated SPs, and ensure you don't lose others. Honestly, I would suggest doing this as SubSonic is designed to generate .Net code from your database.



With SubSonic version 3 and all the power of t4, you can add functionality much more easily, however once you get full Linq support in version 3 you don't need SP to paging and I can't see the reason for generating SP instead of using Linq.

+1


a source


If you really need to use SP, then Codesmith is better. You can build your own SP generators using T4, but that's just an extra layer of fluff when it comes to what Subsonic can help you with.



Up to you and how you design things, but SPs have lost their luster. And no - Linq is no slower than SP. In fact, there is no SP gain at all.

+1


a source







All Articles