Esempio n. 1
0
        public static async Task <long> MarkAsReadAsync(this IDbCollection <CcEvent> collection, IEnumerable <CcEvent> documents)
        {
            var i = 0L;

            foreach (var document in documents.Where(j => j.IsNew))
            {
                document.IsNew = false;
                await collection.UpdateDocumentAsync(document);

                i++;
            }

            return(i);
        }