There are a lot of classes in Microsoft.Data.Sqlite that implement IDispose, as it is just a wrapper for a C library. I tried to clean my code by wrapping a SQL query: