Skip to content

Tag: dapper

How to combine multiple INSERT INTO’s with prepared statements?

Using Dapper, is there a way to form this into one query with the prepared statements? The length of userIds is dynamic. Answer One of the many advantages of Dapper over straight ADO.NET is the simplicity of inserting a list of data to a table. You just need a list of a class <T> where the properties of…

Deserialize Postgres ARRAY [@tags] to List with Dapper?

I’m using Dapper with Npsql (Postgres). I’m saving a serialized list of strings to one column called tags: which is resulting in {{first,second}} in the database. My question is how to read it back to the model? Do I need some special SQL, or can I use SELECT id, text, tags FROM account;? How can …

Issues with Dapper query syntax

little assistance here with my query using dapper, been getting error Message = “ORA-00936: missing expressionn” on my query. I would like to know what am I missing here? Answer Firstly with Oracle queries you need to use : instead of @ to denote a parameter placeholder. Then secondly this code: w…