How to write linq query in Entity FrameWork but my table includes Foreignkey?

Posted by programmerist on Stack Overflow See other posts from Stack Overflow or by programmerist
Published on 2010-04-06T10:29:45Z Indexed on 2010/04/06 10:33 UTC
Read the original article Hit count: 290

i have a table it includes 3 foreignkey field like that:
My Table: Kartlar

  • ID (Pkey)
  • RehberID (Fkey)
  • KampanyaID (Fkey)
  • BrimID (Fkey)
  • Name
  • Detail

How can i write entity query with linq :?


select * from Kartlar where RehberID=123 and KampanyaID=345 and BrimID=567 

BUT please be carefull i can not see RehberID ,KampanyaID, BrimID in Entity they are Foreign Key. I should use Entity Key but How?

© Stack Overflow or respective owner

Related posts about c#3.0

Related posts about ASP.NET