C# original object and session information getting overwritten
<p>I am seeing this for the first time. Here is what i have</p>

<p>I get the customer from the session, here my country code is 2 letter code</p>

<pre><code>var selCustomer = SessionService.GetItem&lt;Customer&gt;(SessionKeys.SelectedCustomer);
</code></pre>

<p>I need to turn the 2 letter country code into 3 letter country code for a very specific use</p>

<pre><code>var customerAddress = GeographyServiceInstance.FixAddresss(selCustomer.CustomerAddress, true);
</code></pre>

<p>At this stage, when i check the info, selCustomer.CustomerAddress,  customerAddress and even the customer in the session is changed to 3 letter code. I am not setting the session here, then why is it being over written?</p>

<p>The only way i am able to make it where session and selCustomer.CustomerAddress is not getting overwritten is</p>

<pre><code>var customer = 
    SessionService.GetItem&lt;Customer&gt;(SessionKeys.SelectedCustomer);

// turn customer address into 3 letter country code, 
// hard way, otherwise original object and session 
// address are being overwritten
Address customerAddress = null;
if (customer.CustomerAddress != null)
{
    customerAddress = new Address
    {
        AddressId = customer.CustomerAddress.AddressId,
        AddressLine1 = customer.CustomerAddress.AddressLine1,
        AddressLine2 = customer.CustomerAddress.AddressLine2,
        City = customer.CustomerAddress.City,
        CountryCode = customer.CustomerAddress.CountryCode,
        CountryInfo = customer.CustomerAddress.CountryInfo,
        StateCode = customer.CustomerAddress.StateCode,
        StateInfo = customer.CustomerAddress.StateInfo
    };
}
customerAddress =
    GeographyServiceInstance.FixAddress(customerAddress, true);
</code></pre>
