NULL values in object properties in Entity Framework

Posted by Tony on Stack Overflow See other posts from Stack Overflow or by Tony
Published on 2010-02-12T13:16:44Z Indexed on 2010/03/26 12:43 UTC
Read the original article Hit count: 579

Filed under:
|
|
|

Tables: Article, Author, Comment (1 article and 1 author can have * comments)

In the database is 1 article, 1 author and 1 comment.

The problem is, that code

 myBD my_bd = new myBD();
 var articles = by_bd.Article;

works OK, I can see that an Author and an Article has 1 comment.

But that code

    var comm = (from u in my_bd.Comment
                     where ......
                     select u);

returns the comment but it has NULL values in property Article and Author. Why ?

© Stack Overflow or respective owner

Related posts about entity-framework

Related posts about ASP.NET