Inserting data to database using foreachloop
<h1>I am using a foreach loop</h1>

<pre><code>foreach(var x in items)
{
    // enter code here
}
</code></pre>

<p>and in my code i am sending data to database suppose in my <code>items</code> list i have 10 records i am sending to database  after sending of 5 records due to some problem sending data failed how to rollback all the data i sent to <code>database</code>.</p>

<p>is there any way to handle this situation--i am using entity data model</p>
