Editing an object in a list<objects> without creating a new instance of that object?
<p>I'm making a database in EF4.1 Code First. I have a table, MedicalPlan, with a one-to-many relationship to a CoverageLevel. CoverageLevel primary key is incrementing. When I create the MedicalPlan I declare the coveragelevels and it creates those tables, like so:</p>

<pre><code>medicalPlan.CoverageLevels = new List&lt;CoverageLevel&gt;();
medicalPlan.CoverageLevels.Add(new CoverageLevel() { Cost = 1200, Description = "single" });
medicalPlan.CoverageLevels.Add(new CoverageLevel() { Cost = 1500, Description = "spouse" });
medicalPlan.CoverageLevels.Add(new CoverageLevel() { Cost = 1100, Description = "family" });
</code></pre>

<p>I also have an update function in which I would update a medical plan. I would also like the functionality to update the MedicalPlan's CoverageLevels. In pseudocode, something like:</p>

<pre><code>in medicalPlan edit first item in CoverageLevels() { Cost = 1500 };
</code></pre>

<p>The kicker is that I don't actually want to <em>replace</em> the CoverageLevel, as it has a unique auto-incrementing primary key, so if I create a new one it will have a different primary key than the original. Is there a way to do this in the way that I am attempting?</p>
