Converting IEnumerable to EntitySet
03.09.2008 Среда 18:59
Software: .Net 3.5 or later
To convert IEnumerable
to EntitySet
use the following extension method:
private static EntitySet<T> ToEntitySet<T>(this IEnumerable<T> source) where T : class
{
var es = new EntitySet<T>();
es.AddRange(source);
return es;
}