There is a problem I need help with your query on the data using LINQ to SQL and Entity Framework (I'm using Visual Studio 2010).
I have three tables:
tblNewsDetailstblNewsCategoriestblNewsInCategories
(See photo 1 in the picture below.)
Now, I want to retrieve records in the tblNewsDetails table, with condition CategoryId=1, as shown in photo 2 in the picture below.
But NewsID and CategoryId in tblNewsInCategories table are two foreign keys. I do not see them and I do not know how to use them in my code.
Also, my code has errors, shown in photo 3 in the picture below.
http://img.tamtay.vn/files/photo2/2010/5/28/10/962/4bff3a3b_1093f58f_untitled-1.gif