简体   繁体   English

如何将 Oracle 闪回列添加到受影响实体上的 .Net Core 实体框架 EDMX?

[英]How do I add Oracle Flashback columns to a .Net Core Entity Framework EDMX on affected entities?

During development of a .Net Core EF app, the DBAs implemented Oracle Flashback, which is queried by addressing the table being audited instead of a manual join to another table.在 .Net Core EF 应用程序的开发过程中,DBA 实施了 Oracle Flashback,通过寻址被审计的表而不是手动连接到另一个表来查询。 How do I add these columns to the EDMX files so that the app may query them and present results?如何将这些列添加到 EDMX 文件,以便应用程序可以查询它们并显示结果? Simply refreshing the EDMX doesn't bring in the Flashback information.简单地刷新 EDMX 不会引入闪回信息。

You'll need to run Raw SQL Queries .您需要运行原始 SQL 查询 Eg例如

using (var context = new BloggingContext())
{ 
    var sql = "SELECT * FROM dbo.Blogs AS OF TIMESTAMP TO_TIMESTAMP('2021-03-29 13:34:12', 'YYYY-MM-DD HH24:MI:SS')";
    var blogs = context.Blogs.SqlQuery(sql).ToList();
}

暂无
暂无

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

相关问题 如何使用.net-core和Entity Framework Core和Identity从thenInclude中获取特定列? - How do i get specific columns from a thenInclude using .net-core and Entity Framework Core and Identity? 如何使用.NET Standard和Entity Framework Core为现有数据库创建Entity Framework edmx文件? - How to create an Entity Framework edmx file for an existing database with .NET Standard and Entity Framework Core? .NET 核心实体框架 - 只添加新的子实体 - .NET Core Entity Framework - Only add new child entities 如何使用 Entity Framework Core 定义一个实体 class 作为一个集合在多个实体之间共享? - How do I define an entity class to be shared as a collection across multiple entities using Entity Framework Core? 如何使用Entity Framework Core 2.0为X实体创建链接的X实体 - How do I create linked X entities for a X entity using Entity Framework Core 2.0 在Entity Framework Core中添加实体图 - Add a graph of entities in Entity Framework Core 如何在实体框架中将一个实体映射到许多实体? - How do I map one entity to many entities in Entity Framework? 如何使用 Entity Framework 和 .NET 5.0 构建查询以在相关表中查找不匹配的实体? - How do I contruct a query to find unmatched entities in related table with Entity Framework and .NET 5.0? 将存储过程添加到实体框架模型(.edmx),而无需刷新现有实体 - Add stored procedure to entity framework model (.edmx) without refreshing existing entities 有一个具有很多属性的类/对象,如何在Entity Framework的edmx中自动生成一个表? - Have a class/object with a lot of properties, how do I automatically generate a table in edmx of Entity Framework?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM