I'm using the SqlBuilder to build a dynamic sql statement where the SELECT and WHERE clauses vary. The query is built like this:
SqlBuilder sb = new SqlBuilder();
sb.SELECT("id, name");
sb.FROM("products");
sb.WHERE("name LIKE {0}", new object[] { "a%" });
Once I've got the SqlBuilder ready, I would like to get the raw sql statement. However, the ToString() method returns a string which might look like this:
SELECT id, name FROM products WHERE name LIKE {0}
I need the raw sql with the parameters set, ie:
SELECT id, name FROM products WHERE name LIKE 'a%'
Is it possible using DbExtensions SqlBuilder?