954,514 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

LINQ in C# doesnt work, why?

var studienummerQuery = from members in dbcontent.Medlemmer.Include("Retninger")
                                    orderby members.Fornavn
                                    select members;
           
            foreach(var a in studienummerQuery)
           {
               Console.WriteLine(a);
           }

Thats my code, wonder why it doesnt work..

My tables are:
Medlemmer
Retninger

AMetnik
Newbie Poster
20 posts since Apr 2009
Reputation Points: 10
Solved Threads: 0
 

What is the problem? Do you get any error message?

Mitja Bonca
Nearly a Posting Maven
2,485 posts since May 2009
Reputation Points: 641
Solved Threads: 474
 

getting Endproject.Medlemmer as a return.
which is like Namespace.Tablename

AMetnik
Newbie Poster
20 posts since Apr 2009
Reputation Points: 10
Solved Threads: 0
 

fixed... needed to write a.(coloumn name)

AMetnik
Newbie Poster
20 posts since Apr 2009
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: