public void AddIncident(IncidentModel incident) { if (IncidentList.All(x => x.Id != incident.Id)) { IncidentList.Add(incident); } }
public async void AddIncident(IncidentModel incident) { if (IncidentList.All(x => x.Id != incident.Id)) { await Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { IncidentList.Add(incident); }); } }