How do I Convert a System.Collections.Generic.List<T>
to a System.Data.Linq.EntitySet<T>
?
views:
328answers:
2
+2
A:
var list = new List<string>
{
"element1", "element2"
};
var entitySet = new EntitySet<string>();
entitySet.AddRange(list);
Darin Dimitrov
2010-05-17 11:59:18
Thanks for ur answer. It did work
Johnny
2010-05-17 12:54:38
+2
A:
Don't think you can convert a List<T>
to an EntitySet<T>
but you can put the content of your list in the entitySet.
var list = new List<string> { "a", "b", "c" };
var entitySet = new EntitySet<string>();
entitySet.AddRange(list);
madgnome
2010-05-17 12:00:14