EF LINQ to PostgreSQL Include
Posted: Tue 23 Jun 2015 22:37
As I understand it you should be able to construct an eager laoding statement like:
but I can only get it to work if I use a string (which is obviously not great). I feel I'm missing something obvious here...
(EF to PostgreSQL 9.3.4)
Code: Select all
var blog1 = context.Blogs.Where(b => b.Name == "PostgreSQL")
.Include(b => b.Posts).FirstOrDefault();
Code: Select all
var blog1 = context.Blogs.Where(b => b.Name == "PostgreSQL")
.Include("Posts").FirstOrDefault();