Exemplo n.º 1
0
 private static void SaveAnnotations(this LiteRepository repo, PdfFile document, IEnumerable <WordAnnotation> annotations, bool updatePdfLastSeen = true)
 {
     repo.EnsurePdfFile(document, updatePdfLastSeen);
     repo.Delete <WordAnnotation>(wa => wa.Document.Id == document.Id);
     repo.Insert <WordAnnotation>(annotations.Select(a =>
     {
         a.Document = document;
         return(a);
     }));
 }