public int GetCount(string filter) { int count = 0; using (PersistentManager pm = new PersistentManager()) { AreaDao areaDao = new AreaDao(); count = areaDao.FindCount(filter); } return(count); }