SimplCommerce icon indicating copy to clipboard operation
SimplCommerce copied to clipboard

Set default DeleteBehavior for all relationship to Restrict

Open thiennn opened this issue 8 years ago • 4 comments

EF Core 2.0 default behavior is CASCADE. That mean all the child will be deleted when the parent is deleted. See here for more details https://docs.microsoft.com/en-us/ef/core/saving/cascade-delete

In SimplCommerce, we prefer to set this default behavior to Restrict to prevent data loss. Scenarios required Cascade need to explicitly override.

thiennn avatar Jan 22 '18 10:01 thiennn

https://github.com/aspnet/EntityFrameworkCore/issues/3815

thiennn avatar Jan 22 '18 10:01 thiennn

U close to prime time? :-)

Sent from my iPhone

On Jan 30, 2018, at 11:56 AM, Thien Nguyen Le Quynh [email protected] wrote:

Closed #370.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

GerryHazelton avatar Jan 30 '18 20:01 GerryHazelton

https://stackoverflow.com/a/34777839

jducobu avatar Jan 31 '18 07:01 jducobu

It's done already

thiennn avatar Jan 31 '18 08:01 thiennn