using (var command = new SQLiteCommand("select * from messages", DB))
using (var reader = command.ExecuteReader())
var rowsCount = 0;
{
using var command = new SQLiteCommand("select * from messages", DB);
using var reader = command.ExecuteReader();
while(reader.Read())
{
rowsCount++;
}
}
Console.WriteLine($"Total: {rowsCount} rows selected");