Sep 19, 2014 at 7:23 PM
Edited Sep 19, 2014 at 8:59 PM
I agree -- it should work as I've seen where it is used in one of your examples.
In my production code, I added a parameter (a list of years we wanted to exclude) to the view model's and model's constructors so the model could do some validation.
var vm = new NewProgramCountYearViewModel(this.excludeTheseYears);
After that, the code suddenly started working. If I comment out the constructor parameters, the returned Year value is again null.
I'm trying to workup a simple repro for you, but right now I can't get it to fail. If I come up with something, I'll let you know.
I was able to create a simple repro that shows classes that work and classes that don't work. The only difference (besides the names of course) is I pass an integer as a parameter to the view model -> model constructors in the classes
that work. Please let me know where to send this.