linq to List problem in C#

c#, linq, linq-to-sql, list

Solution

You can do it in a number of ways:

z.AddRange(allZones);    // if there are other elements in z
z = allZones.ToList();   // if there are no other elements in z (creates a new list)

Problem

I have class Zones with properties and i want add data which i read with linq to this properties. example ``` List<Zones> z = new List<Zones> z.add(new Zones(...)); var allZones = from s in db.Zones select s; ``` How can i add allZones to z generic List?

Original source