I have a Mongoose model Product where
var newProduct : {
name : "Product 1",
color : "red",
categoryId : 1023,
isAvailbale : true
}
var mongooseProductModel = new products(newProduct);
With Mongoose with everything setup I can save Product by calling
mongooseProductModel.save(function(err)){
}
This works fine when I want to create one product only. But what if I want to create multiple products at one shot? Like in entity framework we can submit a collection of entities to the DBContext and calling save will save all entities with a single save product call. Is it possible to achieve that with Mongoose?