Using Dapper.net with MySql & Oracle

asp.net-mvc-3 c# dapper mysql oracle

Question

All the samples online show that Dapper.net works with SQL Server. What about other Databases like mySQl or Oracle? Is there a guideline or sample on how to do so?

Accepted Answer

Pretty much, no change. The only major difference is that the connection you are starting from will be of a different type, but since the extension method is on the base connection that won't matter. The command is of course for a different engine so the SQL variant may be slightly different, including using a different prefix for parameters :foo or $bar etc. Dapper automatically detects oracle for enabling pass-by-name.




Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Is this KB legal? Yes, learn why
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Is this KB legal? Yes, learn why