DataAccessLayer.DataBase.UpdateCityAndCountry C# (CSharp) Method

UpdateCityAndCountry() public method

public UpdateCityAndCountry ( System.Guid id, string newCity, string newCountry ) : bool
id System.Guid
newCity string
newCountry string
return bool
        public bool UpdateCityAndCountry(Guid id, string newCity, string newCountry)
        {
            var queryString =
                 "UPDATE [dbo].[accounts] " +
                     "SET [country] = @country" +
                     ", [city] = @city " +
                 "WHERE [dbo].accounts.accountid = @accountid";

            using (SqlConnection connection = new SqlConnection(_connectionString))
            {
                var command = new SqlCommand(queryString, connection);

                command.Parameters.AddWithValue("country", newCountry);
                command.Parameters.AddWithValue("city", newCity);
                command.Parameters.AddWithValue("accountid", id);

                try
                {
                    connection.Open();
                    command.ExecuteNonQuery();
                }
                catch (Exception)
                {
                    throw;
                }

                return true;
            }
        }