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