Assigning a default value for DateTime in EntityFramework designer?

R

Ralf Kaiser

Hello,

how can i assign a default value for DateTime columns in the entity
framework designer? (or does it use the default value of the underlying
database column?)

When i try to assign "DateTime.Now" in the designer i get a compiler error
that the value has a wrong format. I was trying to enter the default value
into the property grid in the designer! (setting a value from code is no
problem but when it is set in the designer i am not able to forget to set
the value in my code :)

Thanks in advance,
Ralf
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top