We use Oracle as our database provider and have looked into replacing some of our data access layer (hard to maintain, harder to merge XSD\'s) with a saner repository based
IMO, the correct approach here is not to (as per the accepted answer) use the database specific parameter prefix (so @ for sql-server, : for oracle) - but rather: use no prefix at all. So ultimately this is:
il.Emit(OpCodes.Ldstr, prop.Name);
(etc)
In particular, a static property would be bad as it would limit you to one vendor per AppDomain.
Dapper has been updated with this change. It also now dynamically detects BindByName and sets it accordingly (all without needing a reference to OracleCommand).