EF 4.1 - How to add a default on insertion for datetime column

后端 未结 6 620
野性不改
野性不改 2021-01-20 01:25

Using EF 4.1 how could I add a default value to the underlying table? In this particular case how could I set a datetime column to the equivalent of getdate every time I in

6条回答
  •  余生分开走
    2021-01-20 01:59

    You could (and perhaps should) do it in the table itself using a trigger or a default value.

提交回复
热议问题