Note you can add the Microsoft.AspNetCore.WebUtilities
nuget package from Microsoft and then use this to append values to query string:
QueryHelpers.AddQueryString(longurl, "action", "login1")
QueryHelpers.AddQueryString(longurl, new Dictionary<string, string> { { "action", "login1" }, { "attempts", "11" } });