Is there any library for instantiating objects with dummy data in their properties?

I wonder if there is any .net library for instantiating a "dummy" object. In my specific scenario, I deal with classes with a large number of fields, so manual creation is impractical.

It's not that hard to code. But maybe there is something. Thanks

+4
source share
1 answer

There is. Check out NBuilder .

var products = Builder<Product>.CreateListOfSize(100) .WhereTheFirst(10) .Have(x => x.QuantityInStock = Generate.RandomInt(1, 2000)) .List; 

And this is from there. Pretty cool stuff.

+6
source

All Articles