I know that when I do a saveChanges(), EF does not ensure the order of the t-sql, so it could try to delete the parent before to delete the child so I get an error about the reference integrity.
By the moment the logic and decision of what I want to delete I prefer to have it in one place, so in my case I would like to have in my repository and not to have the cascade on delete in the relationship in the database, but if I choose this option, how
is the best way to delete parents and childs with EF?
I could try to use many saveChanges, but I think that I lost performance because I make more calls to the database.
thank you so much.