title: How to assign default values and define unique keys in Entity Framework 4 Designer
body: <p>I've had a look at the Entity Framework 4. While generating code for the SQL Server 2008 I came to the point where I want to define some default values for some fields.</p>
  
  <ol>
  <li><p>how to define in the designer for a Created DateTime Field the DateTime.Now default value? </p>
  
  <p>-> Error 54: Default value (DateTime.Now) is not valid for DateTime. The value must be in the form 'yyyy-MM-dd HH:mm:ss.fffZ'</p></li>
  <li><p>how to make for code generation a string Field unique. Like E-Mail or Username can exists only once in the table.</p></li>
  </ol>
  
  <p>I've search alot in the internet and also checked my books Pro Entity Framework 4.0 and Programming Entity Framework. But none of them seems to come up with the default value issue, or using sql commands as default values for database generation.</p>
  
  <p>Another thing is, how to prevent on database generation always from droping tables? 
  Instead i want to append non existing fields and keep the data.</p>
  
  <p>Thanks for any suggestions.</p>