public SampleDataSource() { var dm = new DocumentReference() { Dokumentnummer = "NOR123455", DokumentUrl = "http://www.orf.at/", Kurzinformation = "Nix", ArtikelParagraphAnlage = "Artikel sowieso" }; _documentReferences.Add(dm); var dl = new DbDownloadedDocument() { Id = 1, DokumentNummer = "NOR123455", DokumentTitel = "§1 Faschingsgesetz", LastDownloaded = DateTime.Now }; _downloads.Add(dl); _history.Add(new DbRisQueryParameter(new RisFulltextQueryParameter("Ehe"), 8787)); _history.Add(new DbRisQueryParameter(new RisFulltextQueryParameter("Gesellschaftsrecht"), 46)); }
public async Task RefreshDownload(DbDownloadedDocument doc, int idToReplace) { // TODO: do it properly in a transaction *or* use InsertOrReplace await DeleteDownload(idToReplace); await InsertDownload(doc); }
public async Task DeleteDownload(DbDownloadedDocument doc) { int result = await _connection.DeleteAsync(doc); }
public async Task InsertDownload(DbDownloadedDocument doc) { int result = await _connection.InsertAsync(doc); }