Try this. The method needs to be a generic, TEntity
is simply the placeholder for the type.
public static void DeleleAllObjects<TEntity>( this ObjectSet<TEntity> objectSet,
IEnumerable<TEntity> objects)
where TEntity : class
{
foreach(var o in objects)
{
objectSet.DeleteObject(o);
}
}
tvanfosson
2010-09-18 15:59:08