public ShoppingListRepository(IMongoCollection <ShoppingListDocument> shoppingListCollection, IShoppingItemsRepository <ShoppingListDocument, ShoppingItemDocument> itemsRepository) { this.shoppingListCollection = shoppingListCollection ?? throw new ArgumentNullException(nameof(shoppingListCollection)); this.itemsRepository = itemsRepository ?? throw new ArgumentNullException(nameof(itemsRepository)); }
public ShoppingTemplateRepository(IMongoCollection <ShoppingTemplateDocument> templatesCollection, IShoppingItemsRepository <ShoppingTemplateDocument, ShoppingItemDocument> itemsRepository) { this.templatesCollection = templatesCollection ?? throw new ArgumentNullException(nameof(templatesCollection)); this.itemsRepository = itemsRepository ?? throw new ArgumentNullException(nameof(itemsRepository)); }