RangeAttribute and Nullable<int> issue

RangeAttribute and Nullable<int> issue

Postby McMlok » Fri 28 Jun 2013 12:30

Hello,

I have propery witch is Int and can be null. I set min and max as range. When I generate class DataAnnotation RangeAttribute is added to property. Attribute use constructor RangeAttribute(Type, string,string). When property is validating it end with exception that object doesnt implement IComparable interface. It's becouse the type passed to constructor must implement IComparable, but type Nullable<int> (or any other primitive type) doesnt implement it. But if I replace range as Range(min,max) everything works fine. The problem is in template Validation.tmpl witch in every situation use Range(Type,string,string)
McMlok
 
Posts: 20
Joined: Tue 04 Jun 2013 13:01

Re: RangeAttribute and Nullable<int> issue

Postby Shalex » Wed 03 Jul 2013 14:37

Thank you for the report. We will post here when the issue is fixed.
Shalex
Devart Team
 
Posts: 7793
Joined: Thu 14 Aug 2008 12:44

Re: RangeAttribute and Nullable<int> issue

Postby Shalex » Wed 10 Jul 2013 12:51

The bug with applying RangeAttribute of the DataAnnotation validation framework for nullable properties is fixed. We will notify you when the corresponding build of dotConnect for Oracle is available for download.
Shalex
Devart Team
 
Posts: 7793
Joined: Thu 14 Aug 2008 12:44

Re: RangeAttribute and Nullable<int> issue

Postby Shalex » Thu 18 Jul 2013 15:05

New version of dotConnect for Oracle 7.8 is released!
It can be downloaded from http://www.devart.com/dotconnect/oracle/download.html (trial version) or from Registered Users' Area (for users with active subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?f=1&t=27556.
Shalex
Devart Team
 
Posts: 7793
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for Oracle