public List<ClusteredReport> getClusteredReport() { Clustering_Users_DAO dao = null; try { dao = new Clustering_Users_DAO(); dao.beginTransaction(); List<User_SubCategories> list_User_Categories = dao.getAllSubCategories(); List<ClusteredReport> list = new List<ClusteredReport>(); foreach (var item in list_User_Categories) { ClusteredReport cr = new ClusteredReport(); cr.U_SubCategoryID = item.U_SubCategoryID; cr.lstCluster = dao.getClusterInfo_BySubCategory(item.U_SubCategoryID); list.Add(cr); } dao.commitTransaction(); return list; } catch (Exception ex) { dao.rollbackTransaction(); throw ex; } }