Hello,
In my mvc application I have 2 tables named: detail(srNo, ID, work), master(ID, name,plan) that are related with foreign key relation ship from detail to master using "ID" field. "ID" field is primary key of master table. "srNo" field is primary key of detail table.
From the "ID" field, this 2 tables are joined with foreign key relation ship.
Now the Problem is: While adding any row to database, we are first make entry in master table , then in details table. And sometimes due to some exception, when row is succesfully added in master table but can not add in detail table. Then I want to perform rollback from master table.
But when I want to delete the row with recently added ID value (grom linq to sql), which is added in master table it is giving me exception that forign key realtion ship is there .....
And at that time in detail table there is no row of that id field.
Thanks