Hi, yes of course. If you are concerned about bind variables, SqlBinder automatically creates them, as you can see in the tuts and DemoApp section. Maybe this wasn't clear enough in the article - if so please tell me.
Hi Sacha, thanks for the comment and for checking out my stuff! SqlBinder's actually quite different than Dapper! I didn't do a stellar job writing this article You may use SqlBinder and Dapper together (there's UsingWithDapper.sln in the source), hence the performance test (Dapper alone and Dapper+SqlBinder) to try and show how little overhead it adds with a lot of added functionality. I should have probably elaborated more on why would somebody who's used to micro ORMs want this tool or specifically why are they not mutually exclusive at all.
While Dapper alone simplifies the process of passing bind variables, SqlBinder can eliminate entire chunks of SQL along with parameter placeholders if a bind variable is unused - it tailors your entire SQL based on a given set of conditions. It's intended for more elaborate queries. What Dapper does in the background with SQL is rather simple regex find-and-replace to match your placeholders with given values but SqlBinder brings this to a far more sophisticated level, essentially this thing is in no way meant to compete with Dapper - it's just an additional tool.
Now, in the examples above I used the DbQuery class which creates an IDbCommandbut in another example (not covered in the article but available in the source code) I used the lower level Query class and passed it to Dapper to let it take care of creating a command and ORMing. The only possible caveat with this is that Dapper then does (an obviously redundant) regex match to check the SQL but it's an insignificant overhead.
Anyhow... if you ever have time I'd love for you to check this out in more detail and if you still think it's mehhh I'm OK with that! Again, thanks for commenting!!!
I dont think its Meh at all, like I said originally I think you did good job on this, and I can see the use of it completely. I was just curious as to why you might use this over Dapper. Thanks for comments
I really like the idea !
I'm trying to achieve the same goal with a library i'm writing on my spare time (https://github.com/candoumbe/queries).
It's definitely not as sophisticated as what you showed.