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?
Queryhere instead ofExecute? - Mike Perrenoud