Saturday, April 3, 2010

Find Distinct from Table

first you need to declare datacontext class

 private DataClassesDataContext db = new DataClassesDataContext();

 public IEnumerable FindDistictCities()
    {
        var s = db.Donors.Select(p => p.City).Distinct();
        return s;
    }

No comments:

Post a Comment