When deleting a record it deletes all dependents even though I have not set cascade delete in the database, this for business applications is bad and can completely break your application, is there any configuration where I can disable this behavior?
I want the cascade delete to happen only if I configure it in the database.
We are using default EF Core cascade delete (parent entity delete with tracked child items loaded in memory) without any configuration and behaviour depends on your database. If your relations are optional (nullable foreign key) and you delete parent entity all child entities foreign keys will be set to null. If your relations are required loaded in memory child entities will be deleted. More info can be found here: https://docs.microsoft.com/en-us/ef/core/saving/cascade-delete
This in a database with more than 200 tables is a great waste of time,
this could be solved with a configuration, where the line I commented was not generated
//.Include(i => i.Produtos)
Was this implemented? I have a scenario where some tables I would like cascade delete and some not. I have a relationship setup in SQL with no action set in the delete rule in the SQL relationship yet the app has cascade deleted because the field is required. I can't see where to restrict the delete.
I'd watched that video but I'm afraid it doesn't help me.
I would like to cascade delete items like orders / order details. However, in the case of my other example, buildings / stock location, I would not want to delete stock locations when a building is deleted.
So you have relations where you want to cascade delete and relations where you do not want? At the moment this cannot be specified in Radzen UI however we will do our best to provide it as soon as we can. If you turn off cascade deletes in Radzen you can configure everything in your database.