Null Value VS string.Empy

5 posts, 0 answers
  1. john
    john avatar
    67 posts
    Member since:
    Jan 2012

    Posted 17 Sep 2012 Link to this post

    If one column is not nullable in DB. I use Open Access ORM wizad to generate entity class. If I set the string.Empty to the column and call save method, it works without any exception. Is there a way to treat string.Empty as null for one column while update/insert?
  2. john
    john avatar
    67 posts
    Member since:
    Jan 2012

    Posted 19 Sep 2012 Link to this post

    Any solution?
  3. DevCraft banner
  4. PetarP
    Admin
    PetarP avatar
    754 posts

    Posted 20 Sep 2012 Link to this post

    Hello john,

     A possible solution would be to slightly change the t4 template that is used to generate our code in order to apply a check for string empty in the property setter and not allow it.
    Will that work for you?

    Regards,
    Petar
    the Telerik team
    Follow @OpenAccessORM Twitter channel to be the first one to get the latest updates on new releases, tips and tricks and sneak peeks at our product labs!
  5. john
    john avatar
    67 posts
    Member since:
    Jan 2012

    Posted 20 Sep 2012 Link to this post

    I think the feature need to be consider to integrated in OpenAccess ORM framework. It's the basic feature.
  6. PetarP
    Admin
    PetarP avatar
    754 posts

    Posted 25 Sep 2012 Link to this post

    Hi john,

     We have added this feature to our backlog system and we will discuss id and possibly schedule it for implementation for one of our next release.
    Please find your Telerik points updated for making this feature request.

    Kind regards,
    Petar
    the Telerik team
    Follow @OpenAccessORM Twitter channel to be the first one to get the latest updates on new releases, tips and tricks and sneak peeks at our product labs!
Back to Top
DevCraft banner