FransBouma / Massive

A small, happy, dynamic MicroORM for .NET that will love you forever.
Other
1.8k stars 322 forks source link

Stored Procedure support in Massive #284

Closed mikebeaton closed 7 years ago

mikebeaton commented 7 years ago

Okay, sorry, a bit tardy but...

Dear Frans,

Thank you for being maintainer of this very useful project (and for your very quick responses to PRs!).

I'm adding this issue as I have written a candidate for stored procedure support in Massive.

I know Massive already supports reading a single result set from a stored procedure called with optional numbered parameters. This potential new code supports return values, and parameter names and directions.

It is a small, optional, additional file (Massive.SP.cs), with only some very-small non-breaking changes required elsewhere in Massive, to get it to work. I believe it works it in a neat, tidy, Massive-style way, but that's for you to look at and judge!

I've already done the programming work, I'm using it in a live project, along with the rest of Massive. (I basically integrated and re-worked something I was already working on, separately to Massive. I was able to make it far smaller and simpler by leveraging what was already in Massive.) For me, it works and it's very useful.

In order to make it a plausible pull request, I've added appropriate tests. Although it's obviously quite a big change, I genuinely think it could be a candidate for inclusion. Since I've already done the work, I've put it up as a pull request #281 so you can start to have a look and see what you think.

mikebeaton commented 7 years ago

281 - done - thanks