public override List <BookToBeReviewed> Get(BookToBeReviewed instance) { if (instance == null || string.IsNullOrEmpty(instance.File)) { throw new ArgumentNullException(); } FilterDefinition <BookToBeReviewed> filter = Builders <BookToBeReviewed> .Filter.Eq("File", instance.File); try { return(BooksToReviewList.Find <BookToBeReviewed>(filter).ToList <BookToBeReviewed>()); } catch (InvalidOperationException e) { return(new List <BookToBeReviewed>()); } }
public override List <BookToBeReviewed> Get() { FilterDefinition <BookToBeReviewed> filter = Builders <BookToBeReviewed> .Filter.Where(x => true); return(BooksToReviewList.Find <BookToBeReviewed>(filter).ToList <BookToBeReviewed>()); }