RangeAttribute and Nullable<int> issue

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
McMlok
Posts: 26
Joined: Tue 04 Jun 2013 13:01

RangeAttribute and Nullable<int> issue

Post by 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)

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: RangeAttribute and Nullable<int> issue

Post by Shalex » Wed 03 Jul 2013 14:37

Thank you for the report. We will post here when the issue is fixed.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: RangeAttribute and Nullable<int> issue

Post by 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
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: RangeAttribute and Nullable<int> issue

Post by 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.

Post Reply