示例#1
0
        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));
        }
示例#2
0
 public async Task RefreshDownload(DbDownloadedDocument doc, int idToReplace)
 {
     // TODO: do it properly in a transaction *or* use InsertOrReplace
     await DeleteDownload(idToReplace);
     await InsertDownload(doc);
 }
示例#3
0
 public async Task DeleteDownload(DbDownloadedDocument doc)
 {
     int result = await _connection.DeleteAsync(doc);
 }
示例#4
0
 public async Task InsertDownload(DbDownloadedDocument doc)
 {
     int result = await _connection.InsertAsync(doc);
 }