I have an incomplete table of user settings. Now i have a small program that pulls settings from this table. How can i ensure that there is a record for that user in the database?
I got this list
List<Guid> usersWithoutInfo
This list contains the user ids that i need to pull the settings for. How can i first loop through this list and insert the missing records?
I am using a linq data context for all data handling.
Should be something like this. You’ll have to tweak it a bit to compile and work for you
Then use the usersToInsert to insert users in the database