开发者

How do I *not* supply a column for update in EF?

开发者 https://www.devze.com 2022-12-19 04:41 出处:网络
I am sure I am not the first one to struggle with this. I am using Entity Framework 1 (VS2008) and one of the columns in the table is ModifiedDate. It has DefaultValue in SQL Server (getdate()); so

I am sure I am not the first one to struggle with this.

I am using Entity Framework 1 (VS2008) and one of the columns in the table is ModifiedDate. It has DefaultValue in SQL Server (getdate()); so I would like to leave i开发者_开发问答t the DB to do the generation. However, generated SQL has INSERT (... ModifiedDate) VALUES (... null), and the default value doesn't get inserted.

Is it possible to not specify this column at all?


By setting StoreGeneratedPattern in SSDL.

0

精彩评论

暂无评论...
验证码 换一张
取 消