ASP.NET MVC ViewModel's Datetime? gives: Operation could destabilize the runtime

243 Views Asked by At

Well, the title sums it up it pretty well, I do know that I should be providing enough information to make this as easy as possible to answer, but I got absolutelly no idea of what may be causing this all I know is how it happends.

My shot here is to find someone who had this problem in the same or similar cincurstances.

Scenario: I've got a view model class and everything works perfectly, but there's a Datetime property that gives me that default value for Datetime (01/01/0001), so I made it Nullable and then I got this error.

I know there are a lot of different ways to achieve what I intended by making it nullable, but I'm worried that if I don't find out what the problem is or what's causing it, it may happen again later on something more complex and important or even worse, something that I don't have a plan B for.

Any thoughts on this would be appreciated, also if there's something else you want me to include in the question, just let me know and I'll edit it right away, I Honestly don't know what would matter to show in this particular case.

Thanks!

0

There are 0 best solutions below