0

Tables t1 {id, name, addr_id} and t2 {addr_id, addr}

When you create entity for t1 like

dim db = new t1entity()
dim tt = from t in db.t1s where t.addr_id

Here, I cannot use addr_id corresponding to the t

marc_s
  • 675,133
  • 158
  • 1,253
  • 1,388
john
  • 297
  • 2
  • 9
  • There is a link that might help you. Check here http://stackoverflow.com/questions/1589166/it-has-a-definingquery-but-no-insertfunction-element-err[enter link description here][1] [1]: http://stackoverflow.com/questions/1589166/it-has-a-definingquery-but-no-insertfunction-element-err – Pradip Sep 24 '12 at 21:01

1 Answers1

0

If you have navigation properties correctly set, you can use where t.t2.addr_id. If you are using .NET 4.0 or newer you can tell EF to generate addr_id property directly in t1 entity. That will use FK association instead of independent association you are using at the moment.

Community
  • 1
  • 1
Ladislav Mrnka
  • 349,807
  • 56
  • 643
  • 654