CSLA .NET

Vibrant discussion about CSLA .NET and using the framework to build great business applications.

Forum has moved

New location: CSLA .NET forum


CSLA .NET Resources:
  • CSLA .NET forum
  • CSLA .NET home page
  • System.ComponentModel.DataAnnotations

    rated by 0 users
    Answered (Verified) This post has 1 verified answer | 1 Reply | 1 Follower

    Not Ranked
    12 Posts
    flying_monkey posted on Tue, Dec 4 2012 1:51 PM

    Does anyone know which DataAnnotations presently work with CSLA in a Windows Forms application. I have personally had success using Required, StringLength, Range and CustomValidation.

    I have attempted to use the ConcurrencyCheck DataAnnotation without any luck. Is there a list of working ones I can reference, should they all be working?

    Thanks for any info provided.

    Answered (Verified) Verified Answer

    Top 10 Contributor
    2,279 Posts
    Verified by flying_monkey

    The DataAnnotation Validation attributes should all work as they have the same signature.
    http://www.asp.net/mvc/tutorials/older-versions/models-%28data%29/validation-with-the-data-annotation-validators-cs

    Other attributes like Key, NotMapped and ConcurrencyCheck is used in EF and describes actions to the database and these will not do any action in CSLA.

    You can also create your own custom DataAnnotation validation rules and use these in CSLA. But only Validation rules are hooked into the CSLA rule engine.

     

    Jonny Bekkum, Norway CslaContrib Coordinator

    Page 1 of 1 (2 items) | RSS

    Copyright (c) 2006-2014 Marimer LLC. All rights reserved.
    Email admin@lhotka.net for support.
    Powered by Community Server (Non-Commercial Edition), by Telligent Systems