Esempio n. 1
0
        public void SaveYearRecruits(IEnumerable <RecruitViewModel> models)
        {
            _yearRecruitsRepository.DeleteMany(x => true);

            var docs = models.Select(model => new YearRecruit {
                Content = JsonConvert.SerializeObject(model)
            });

            _yearRecruitsRepository.InsertMany(docs.ToList());
        }
Esempio n. 2
0
        public void SaveNoteCategories(IEnumerable <NoteCategoryViewModel> models)
        {
            _noteCategoriesRepository.DeleteMany(x => true);

            var docs = models.Select(model => new NoteCategories {
                Content = JsonConvert.SerializeObject(model)
            });

            _noteCategoriesRepository.InsertMany(docs.ToList());
        }
 /// <summary>
 /// Deletes the many.
 /// </summary>
 /// <typeparam name="TDocument">The type of the document.</typeparam>
 /// <param name="filter">The filter.</param>
 public void DeleteMany <TDocument>(Action <IFilterBuilder <TDocument> > filter) where TDocument : IDocument
 {
     _mongoRepository.DeleteMany <TDocument>(filter);
 }
Esempio n. 4
0
 public void CleanTermNotes() => _termNotesRepository.DeleteMany(x => true);
Esempio n. 5
0
 public async Task RemoveManybyCollectionId(Guid collectionId)
 => await _repository.DeleteMany(p => p.CollectionId == collectionId);