We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I would like to get IQueryable of Blogs with Post included from similar query:
string sql= @"SELECT * FROM Blogs INNER JOIN Posts on Blogs.BlogId = Posts.BlogId AND Author like 'Lier%'"
The reason is, that I need to be able to paginate the blogs like this
var query = dbContext.Set<Blog>().Include(b => b.Posts).FromSql??(sql) .Skip(pageIndex * pageSize). .Take(pageSize);
so I can't do the mapping in memory.
Is it possible to map flat dataset to a class hierarchy? If not, it is theoretically possible in future EF versions?
The entities are the standard Blog/Posts entities from the docs..
public class Blog { public int BlogId {get; set;} public List<Posts> Posts {get; set;} } public class Posts { public int PostId {get; set;} public int BlogId {get; set;} public Blog Blog {get; set;} public string Author {get; set;} }
The text was updated successfully, but these errors were encountered:
Duplicate of #14525
Sorry, something went wrong.
No branches or pull requests
I would like to get IQueryable of Blogs with Post included from similar query:
The reason is, that I need to be able to paginate the blogs like this
so I can't do the mapping in memory.
Is it possible to map flat dataset to a class hierarchy? If not, it is theoretically possible in future EF versions?
The entities are the standard Blog/Posts entities from the docs..
The text was updated successfully, but these errors were encountered: