Nullable DateTime

Jun 8, 2015 at 2:10 PM

How can I configure Fabricator so that by default Nullable elements (for instance nullable DateTimes) are given a null value by default?

I've tried this
            Fabrication.Fabricator.Setup<DateTime?>().ConstructUsing(() => (DateTime?) null);
But that does not work. My models are generated using 1/1/0001 dates which obviously fail if I try to add them to a temporary testing DB. Any ideas?