Skip to Main Content

ODP.NET

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Views return 0 results using EF Core

Hassan AliMar 26 2025

Issue:

When trying to query a view (not a materialised view) in EF Core with Oracle, it returns 0 results with no errors.

Query:

For example, run the below query, which just selects 1 for each row of the view. This is using SqlQueryRaw so I can be clear the issue is not with the mapping.

var results = Context.Database.SqlQueryRaw<int>("SELECT 1 FROM MY_VIEW").ToList();

Expected:

I expect a list of 1s for each row the view returns.

Actual:

The list returns 0 results, with no errors.

Version:

DotNet: 9.0
Oracle.EntityFrameworkCore: 9.23.90

This post has been answered by Hassan Ali on Mar 27 2025
Jump to Answer

Comments

Post Details

Added on Mar 26 2025
5 comments
52 views