Esempio n. 1
0
 public VpaSummaryViewModel(VertiPaqAnalyzerViewModel parent)
 {
     ParentViewModel    = parent;
     TableCount         = parent.ViewModel.Tables.Count();
     ColumnCount        = parent.ViewModel.Columns.Count();
     CompatibilityLevel = parent.ViewModel.Model.CompatibilityLevel;
     TotalSize          = parent.ViewModel.Tables.Sum(t => t.TableSize);
     DataSource         = parent.ViewModel.Model.ServerName?.Name ?? "<Unknown>";
     ModelName          = parent.ViewModel.Model.ModelName.Name;
     LastDataRefresh    = parent.ViewModel.Model.LastDataRefresh;
     ExtractionDate     = parent.ViewModel.Model.ExtractionDate;
 }
Esempio n. 2
0
 public VpaTableViewModel(VpaTable table, VertiPaqAnalyzerViewModel parentViewModel)
 {
     _table                = table;
     _parentViewModel      = parentViewModel;
     Columns               = _table.Columns.Select(c => new VpaColumnViewModel(c, this));
     ColumnMaxTotalSize    = Columns.Max(c => c.TotalSize);
     ColumnsMaxCardinality = Columns.Max(c => c.ColumnCardinality);
     RelationshipsFrom     = _table.RelationshipsFrom.Select(r => new VpaRelationshipViewModel(r, this));
     if (RelationshipsFrom.Count() > 0)
     {
         RelationshipMaxFromCardinality = RelationshipsFrom.Max(r => r.FromColumnCardinality);
         RelationshipMaxToCardinality   = RelationshipsFrom.Max(r => r.ToColumnCardinality);
     }
 }
 public VpaPartitionViewModel(VpaPartition partition, VpaTableViewModel table, VertiPaqAnalyzerViewModel parentViewModel)
 {
     _partition       = partition;
     _parentViewModel = parentViewModel;
     Table            = table;
 }