Click here to Skip to main content
15,895,667 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi ,

My question is which is the best practise to check for duplication before inseerting or updating using linq to sql ,

some says use singleordefault and then check for null ,
someboday says user firstordefault ,
some says use .any which returns boolean ,
some says use count ,..

I know all this are the correct way , but i want to know which is the best practise for this
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900