简体   繁体   English

实体框架,自动将 SystemVersioning 列设置为未映射的临时表

[英]Entity Framework, Make SystemVersioning Columns as NotMapped for Temporal tables Automatically

Entity Framework does not seem to handle System Versioning columns well (StartDate, EndDate) for temporal tables.实体框架似乎不能很好地处理临时表的系统版本控制列(StartDate、EndDate)。 When we scaffold a database automatically, we want to place SystemVersioning Columns as NotMapped .当我们自动构建数据库时,我们希望将 SystemVersioning Columns 放置为NotMapped Is there a parameter in commandline to make System Versioning Columns automatically as not mapped?命令行中是否有参数可以自动使系统版本控制列未映射? Company literally 1000s of tables, and need way to make them automatically NotMapped, everytime we rescaffold.公司实际上有 1000 张表,并且每次我们重新搭建脚手架时都需要自动使它们未映射的方法。 Scaffolding is done very week.脚手架是每周完成的。

dotnet ef dbcontext scaffold 

Make the columns HIDDEN, and they will not be scaffolded.使列隐藏,它们将不会被搭建。

ALTER TABLE [dbo].[Account] ALTER COLUMN [StartDate] ADD HIDDEN;

hide a column from table in MS SQL Server 在 MS SQL 服务器的表中隐藏一列

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM