Main Entity : Customer
Related Child Entity : Phonenumber
Business Sceanrio :
Our business uses ui to show customer details and list of phone no.
User can add as many phone nos as he wishes to.
If user want to delete existing phone and add new ones , he can.
Also user can modify other details like date of birth , first name present on Customer form.
This data is linked to Ms Crm Databse so customer is parent entity and phone no is associated child entity.
Requirement :
Old Phone no list : 11 , 22 , 33 , 44
When update is fired on customer , Delete all Phonenumbers
After update on Customer:
There will be no phonenumber linked to that customer
Approach 1 :
Write Delete code in c# when you update customer
Approach 2 :
Write trigger on customer update in sql to delete all associated phone no