How to delete circular many to many in entity framework 4.0?
I have 3 tables: 
Users (Id, ..) , Groups(Id,..) and Users_Groups(Id_User, Id_Group)

with rows: Users(Id = 1, 3), Groups(Id = 1, 2) and Users_Groups((1,1), (3, 1), (3, 2), (1, 2))
And I want to delete all the rows.

I have no direct access to table Users_Groups, only: User u;u.Groups .. and Group g;g.Users...

Rows have circular dependecy so I can't delete like this:
User user1 = context.Users.FirstOrDefault(x => x.Id == 1);
user1.Groups.Remove(g1);//g1 is a row from table Groups with Id = 1

because g1 depends on u3, u3 depends on g2, and g2 depends on u1.

If a had direct access to table Users_Groups i would first delete the relationship and then from Users and Groups.

Please help me to delete all rows in entity framework 4.0.

Thanks in advance !

How to delete circular many to many in entity framework 4.0?
===

I have 3 tables: 
Users (Id, ..) , Groups(Id,..) and Users_Groups(Id_User, Id_Group)

with rows: Users(Id = 1, 3), Groups(Id = 1, 2) and Users_Groups((1,1), (3, 1), (3, 2), (1, 2))
And I want to delete all the rows.

I have no direct access to table Users_Groups, only: User u;u.Groups .. and Group g;g.Users...

Rows have circular dependecy so I can't delete like this:
User user1 = context.Users.FirstOrDefault(x => x.Id == 1);
user1.Groups.Remove(g1);//g1 is a row from table Groups with Id = 1

because g1 depends on u3, u3 depends on g2, and g2 depends on u1.

If a had direct access to table Users_Groups i would first delete the relationship and then from Users and Groups.

Please help me to delete all rows in entity framework 4.0.

Thanks in advance !
