C. Allen
C. Allen

Reputation: 35

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.

Upvotes: 0

Views: 127

Answers (1)

David Browne - Microsoft
David Browne - Microsoft

Reputation: 89406

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();
}

Upvotes: 1

Related Questions