Hi there
I have a Contact Entity which has it's two types of related collection one is Contact Address and other is Contact Email.
Now what I am doing on each update first I am saving the contact entity ,then I am deleting both types of it's related collection's entities then adding new enties to each of the collection to save them all
I am implementing whole of the scenerio in singular transaction
the algo looks like as follows
1)otransaction.Add(oContactEntity);
2)otransaction.Add(oContactAddressCollection);
3)otransaction.Add(oContactEmailCollection);
4)oContactEntity.Save();
5)oContactAddress.DeleteMulti(filterForDeletingRelatedEntity);
6)Add New Entities to oContactAddress
7)oContactAddress.SaveMulti();
8 )oContactEmail.DeleteMulti(filterForDeletingRelatedEntity);
9)Add New Entities to oContactEmail
10)oContactEmail.SaveMulti();
11) Commit if run without exception else rollback
Now my problem here is that
after step '5' I am unable to save entites . It is giving timeout exception which is possiblly the lock taken by the transaction( because the code runs successfully without using transaction). The isolation level is serializable. I need to do all this in a single transaction How do I Implement all this, I got stuck here . Kindly help me out!