Sometimes Dapper’s behaivor when your querying for one value can act a little unexpectedly. This turned me onto this - needing to coalesce when your SQL query doesn’t return anything. So if you want an int and your query doesn’t return any results, coalesce will give you a result which makes Dapper happy.