Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Aug 12, 2012 02:17 AM by Decker Dong - MSFT
Member
199 Points
228 Posts
Aug 10, 2012 12:46 PM|LINK
I would like to have some columns with defualt values in my dbSet but Im not sure how to do it. I've named some
public System.DateTime dateCreated { get; set}; // getdate()
public SystemDteTime dateModified { get; set; } // getdate() last modified
public Nullable<System.DateTime> dateCreatedNoTimePart { get; set; } getdate() withno time part ie 2010-12-02: 00:00:00
any annotations I can use?
All-Star
118619 Points
18779 Posts
Aug 12, 2012 02:17 AM|LINK
QuantumInformation any annotations I can use?
Hi,
In fact I think you can do to initialize the value by assigning to the public properties in the constructor,sample looks like this below:
public class MyClass { ……………… public MyClass() { //Here please assign values to the public properties…… } }
QuantumInfor...
Member
199 Points
228 Posts
Annotations for dates
Aug 10, 2012 12:46 PM|LINK
I would like to have some columns with defualt values in my dbSet but Im not sure how to do it. I've named some
public System.DateTime dateCreated { get; set}; // getdate()
public SystemDteTime dateModified { get; set; } // getdate() last modified
public Nullable<System.DateTime> dateCreatedNoTimePart { get; set; } getdate() withno time part ie 2010-12-02: 00:00:00
any annotations I can use?
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: Annotations for dates
Aug 12, 2012 02:17 AM|LINK
Hi,
In fact I think you can do to initialize the value by assigning to the public properties in the constructor,sample looks like this below:
public class MyClass { ……………… public MyClass() { //Here please assign values to the public properties…… } }