public LocationList SelectAll()
 {
     locations       = new LocationList();
     cmd.CommandText = "SELECT  * From Location";
     locations       = new LocationList(base.Select());
     return(locations);
 }
        public LocationList Locationby_person(Person p)
        {
            cmd.CommandText = "SELECT Distinct Location.* FROM(Location INNER JOIN  Comment ON Location.ID = Comment.Location)" +
                              "WHERE Comment.Creator =@id";
            cmd.Parameters.Add(new OleDbParameter("@id", p.ID));
            LocationList l = new LocationList(base.Select());

            return(l);
        }
        public Location SelectByID(int id)
        {
            if (locations == null)
            {
                LocationDB db = new LocationDB();
                locations = db.SelectAll();
            }
            Location loc = locations.Find(c => c.ID == id);

            return(loc);
        }