public async void AddUpdateYoutubeHistoryItem(YoutubeHistoryItem item) { LoggingService.LogInformation("writing to db 'Scene'", "AppDatabase.AddUpdateYoutubeHistoryItem"); var found = RetrieveYoutubeHistoryItem(item.Id); if (found != null && found.Count() > 0) { this.SqliteDb.Update(item); } else { var newId = this.SqliteDb.Insert(item); } Messenger.Default.Send<GeneralSystemWideMessage>(new GeneralSystemWideMessage("updating ...") { Identifier = "DB", SourceId = "YoutubeHistoryItem" }); Messenger.Default.Send<GeneralSystemWideMessage>(new GeneralSystemWideMessage("") { Identifier = "YOUTUBE", AggregateId = item.Id.ToString(), Action = "UPDATED" }); }
public async void AddUpdateYoutubeHistoryItem(YoutubeHistoryItem item) { LoggingService.LogInformation("writing to db 'Scene'", "AppDatabase.AddUpdateYoutubeHistoryItem"); var found = RetrieveYoutubeHistoryItem(item.Id); if (found != null && found.Count() > 0) { this.SqliteDb.Update(item); } else { var newId = this.SqliteDb.Insert(item); } Messenger.Default.Send <GeneralSystemWideMessage>(new GeneralSystemWideMessage("updating ...") { Identifier = "DB", SourceId = "YoutubeHistoryItem" }); Messenger.Default.Send <GeneralSystemWideMessage>(new GeneralSystemWideMessage("") { Identifier = "YOUTUBE", AggregateId = item.Id.ToString(), Action = "UPDATED" }); }