private async Task <long> AddGroupWithConnection(SQLiteConnection conn, string groupName) { using (var cmd = new SQLiteCommand(SQLQueries.AddGroup(), conn)) { cmd.Parameters.Add(new SQLiteParameter("@Group", groupName.ToUpper())); await cmd.ExecuteNonQueryAsync(); } using (var cmdGetID = new SQLiteCommand(SQLQueries.GetLastInsertedRowID(), conn)) return((long)await cmdGetID.ExecuteScalarAsync()); }