Dapper Orm delete exception

c#, dapper

Solution

The issue here is that you're using `Query` instead of `Execute`. The `Query` method is trying to find a column named `Id` to build the result set and can't because it's not a query.

Problem

I'am triying to delete with dapper orm. But im getting this exception: When using the multi-mapping APIs ensure you set the splitOn param if you have keys other than Id My code is shown below: ``` public void DeleteRole(int ID) { using (var conn = new SqlConnection(connectionString)) { conn.Open(); conn.Query("DELETE FROM [Role] WHERE ID=@ID", new {ID=ID }); } } ``` Any idea?

Original source