void OnSnowtamAddedToRepository(object sender, EntityAddedEventArgs<Snowtam> e) { var viewModel = new SnowtamViewModel(e.NewEntity, _snowtamService); this.AllSnowtams.Add(viewModel); }
void CreateSNowtam() { foreach (var obj in this.Workspaces) { if (obj.DisplayName == Entity.SnowtamViewModel_DisplayName) { this.SetActiveWorkspace(obj); return; } } Snowtam newSnowtam = NOTAM.SERVICE.Model.Snowtam.CreateNewSnowtam(); SnowtamViewModel workspace = new SnowtamViewModel(newSnowtam, _snowtamService, Workspaces); this.Workspaces.Add(workspace); this.SetActiveWorkspace(workspace); }