public TagRepository(ISimpleBlogDbContext simpleBlogDbContext) { if (simpleBlogDbContext == null) { throw new ArgumentNullException(nameof(simpleBlogDbContext)); } _mongoCollection = simpleBlogDbContext.CreateCollection <Tag>(); }
public UserRepository(ISimpleBlogDbContext simpleBlogDbContext) { if (simpleBlogDbContext == null) { throw new ArgumentNullException(nameof(simpleBlogDbContext)); } _mongoCollection = simpleBlogDbContext.CreateCollection <User>(); _insertOneOptions = new InsertOneOptions() { BypassDocumentValidation = false }; }