I want to delete the records that are not there in database. I will take an example.
I am sending 3 questions to the controller. Q1,Q3 and Q4. In the database there are only two records Q1 and Q2. Then i need to delete the Q2 and i need to add Q3 and Q4. How can i write a query using linq for this. Hope you understand my question.
Regards,
Sri
I don’t know much about it but if it isn’t a large amount of data you can try something like this:
Have in mind that comparing objects (instead of base types) wont work. You will have to create an IEqualityComparer as shown here.