I am using checkedListBox with windows forms . I am using LINQ for database operations.
Now when user edits the form I need to see if checkboxes are new selected and if entry does not exist insert to the table.If they had checked it before and now they checked it off I need to delete that entry from database. Can some one help me how can I do this in LINQ some easy way ? In sort I need to Insert any newly selected checkboxes and 开发者_StackOverflowdelete if they existed before but are not checked off.
Thanks a lot.
You can easily get the checked and unchecked items, but to determine if they are originally checked/unchecked, you have to store that somewhere, whether the tag property or in a variable somewhere.
HTH.
精彩评论