Nullable Fields on TypedViews

Posts   
 
    
Posts: 16
Joined: 11-May-2010
# Posted on: 27-Oct-2011 09:02:02   

So Nullable fields on TypedViews always return the default value instead of null. And I need to use the IsXNull() method to check for null.

Is there a way maybe by changing the generation template to allow the property getters to actually return nullable values? The reason is I am using a mapper that maps the TypedView Rows to DTOs, and of course i would like to have those properties returning null without having to use for the IsNull method all the time in my mapping logic.

Any Idea?

Thanks

Luis

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 27-Oct-2011 11:02:01   

TypedViews are mapped on database views, for which no metadata is found to determine if the view field is nullable or not.

Posts: 16
Joined: 11-May-2010
# Posted on: 27-Oct-2011 11:41:24   

Gotcha. Thanks