Search   

Sunday, February 05, 2012

Support » Support Forum

Register  Login

 Menu  
 
    

 Welcome!  
 


Welcome to the NDO support forum!

kreis.gif Please register/login at the site if you want to post a thread. We sometimes copy support mails of common interest to the forum. They appear with anonymous sender.
kreis.gif Please post your messages in English language if possible. You can do your posts also in German, we will translate your post and our answer so that all users of the forum can read your posts.
kreis.gif The forum software requires that javascript is enabled.
kreis.gif Please do not insert licence information or licence keys in forum posts.
kreis.gif If you know a good answer to a post of another user, feel free to reply!
kreis.gif The forum is monitored. We reserve the right to remove posts we consider not to be useful for other forum users.

   Print   

      
 NDO Support Forum  
 
SearchForum Home
  NDO-Forum postings in english please, if possible.  Developing with NDO  Nullable Datayp...
 Nullable Dataypes
 
 2/12/2007 11:20:18 AM
mig
9 posts


Nullable Dataypes
Hallo, has anyone an idea how to map nullable datatypes (i.e. decimal?) into a relational database. Is this feature supported by NDO? Greetings, Michael
 2/12/2007 12:19:55 PM
Mirko
109 posts
5th


Re: Nullable Dataypes

Hi Michael,

NDO supports Nullables:

[NDOPersistent]
public class MyClass
{
    Nullable someValue; // will be persisted
    ...
}

Having said that, I'd recommend not to use Nullables under normal circumstances, because you need a lot of unnecessary logic to test if a certain field is initialized. There are some rare cases where it makes sense to persist an "undefined" state and the Nullables are for these rare cases. In all other cases try to use define default values for your numeric fields.

Note that strings being null, DateTime.MinValue and Guid.Null are persisted as NULL by NDO and vice versa, so that you don't need Nullables for these datatypes.

Best Regards:
Mirko

 

  NDO-Forum postings in english please, if possible.  Developing with NDO  Nullable Datayp...
  SearchSearch  Forum HomeForum Home