简体   繁体   中英

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. How do I add these columns to the EDMX files so that the app may query them and present results? Simply refreshing the EDMX doesn't bring in the Flashback information.

You'll need to run Raw SQL Queries . 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();
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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