We've added a RangeConstraint om some decimal? fields like so:

    /// <summary>
    /// Hoeveelheid
    /// </summary>
    [Field(Nullable = true)]
    [Metadata(Decimals = 2)]
    [RangeConstraint(Min = 0, Message = "Hoeveelheid mag niet negatief zijn ({value})")]
    public decimal? Hoeveelheid { get; set; }

and get an Exception from DO saying:

Comparer for type "System.Nullable`1[System.Decimal]" is not found

I think there is no implementation for the decimal? in this case. How do I solve this?

Regards Paul

asked Dec 05 '13 at 03:57

Paul%20Sinnema's gravatar image

Paul Sinnema

edited Dec 05 '13 at 03:58

One Answer:

I already discovered why. Attributes can only have primitive properties because attributes are compiled into the metadata and only primitives are allowed there. A decimal(?) is not a primitive.

answered Dec 05 '13 at 07:57

Paul%20Sinnema's gravatar image

Paul Sinnema

Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
toggle preview


Once you sign in you will be able to subscribe for any updates here



Asked: Dec 05 '13 at 03:57

Seen: 2,022 times

Last updated: Dec 05 '13 at 07:57

powered by OSQA