Hi,
I just upgraded my project to ASP.net MVC RC. The bad thing is HTML helpers are throwing exceptions from the dataset even when I pass a new datarow. Error is as a result of conversion to dbnull from .net object types.
This exceptions occurs on my UI. I do check for DBnull on update but not when binding. MVC beta wasn't behaving as such and I think it's good. Frameworks shouldn't throw exceptions on retrieving dbnull values from datasource...
Is there a solution to this problem?
-
Convert the values in your dataset to a view model, a collection of objects of a class with strongly-typed, named properties corresponding to your columns, that contains
nullvalues instead ofDBNull. Pass this model to your view.Report the problem at www.codeplex.com as an issue. Note you may need to create a free login before you can submit an issue.
0 comments:
Post a Comment