I have the following data in my database (comma separated strings):
"word, test, hello"
"test, lorem, word"
"test"
...
etc
How can I transform this data into a Dictionary whereby each string is separated into each distinct word together with the number of times that it occurs, i.e.
{"test", 3}, {"word", 2}, {"hello", 1}, {"lorem", 1}
I will have approximately 3000 rows of data in case this makes a difference to any solution offered. Also I am using .NET 3.5 (and would be interested to see any solution using linq)