I am looking at the sql executed when I call SaveChanges on context, it does update , delete and insert sql stament in that order.. is there a way to change it to delete , update , insert ?
The only way that I can think of is to call your Delete()
first then SaveChanges()
then do the rest Insert()
and Update()
. Not saying that is the only way...
Looks like there is no way to change the order... - DbContext SaveChanges Order of Statement Execution
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With