SqlCommand.Cancel() doesn't appear to work using System.Data.SqlClient on Linux (Ubuntu 19.04, .NET Core SDK 3.0.100-preview5-011568) - the command runs to completion, and only then throws ...
For updating the query will change the parameter except that everything remains the same. try { string connectionString = "server=.;" + "initial catalog=employee ...