GetDatasetLatestVersions() public method

Returns a list of the latest versions of all datasets associated to a data structure, including/ excluding the checked out versions.
identifiers are returned to reduce the number of database roundtrips!
public GetDatasetLatestVersions ( System.Int64 structureId, bool includeCheckouts = false ) : DatasetVersion>.Dictionary
structureId System.Int64 The data structure that its associated datasets are searched.
includeCheckouts bool Determines whether the checked out versions should be included in the result.
return DatasetVersion>.Dictionary
Esempio n. 1
0
        public ActionResult Datasets_Select()
        {
            DatasetManager datasetManager = new DatasetManager();
            PermissionManager permissionManager = new PermissionManager();
            SubjectManager subjectManager = new SubjectManager();

            // DATA
            //var ids = datasetManager.GetDatasetLatestIds();
            List<DatasetVersion> data = datasetManager.GetDatasetLatestVersions(); // .GetDatasetLatestVersions(ids);

            List<DatasetGridRowModel> datasets = new List<DatasetGridRowModel>();
            data.ForEach(d => datasets.Add(DatasetGridRowModel.Convert(d, permissionManager.ExistsDataPermission(subjectManager.GetGroupByName("everyone").Id, 1, d.Id, RightType.View))));

            return View(new GridModel<DatasetGridRowModel> { Data = datasets });
        }
Esempio n. 2
0
 private void getAllDatasetVersions()
 {
     DatasetManager dm = new DatasetManager();
     List<Int64> ids = dm.DatasetRepo.Query().Select(p => p.Id).ToList();
     var b = dm.GetDatasetLatestVersions();
     var a = dm.GetDatasetLatestVersions(ids);
     var c = dm.GetDatasetLatestMetadataVersions();
 }
Esempio n. 3
0
 public void fillDatasetList()
 {
     DatasetListElement datasetListElement = new DatasetListElement();
     DatasetManager dm = new DatasetManager();
     datasets = new List<DatasetListElement>();
     foreach (var item in dm.GetDatasetLatestVersions(dataStructure.Id, true))
     {
         datasetListElement = new DatasetListElement(item.Key, XmlDatasetHelper.GetInformation(item.Value, NameAttributeValues.title));
         datasets.Add(datasetListElement);
     }
 }