Inner join in Entity Framework (EF) 5.0 (VS 2012)

  • Thread starter Thread starter Mobile Boy
  • Start date Start date
M

Mobile Boy

Hello group,

Dim MyEFCustumer As Custumer

MyEFCustumer = DAL.DataAccess.Db.Database.SqlQuery(Of
ContactInfoLine)("Select * from Custumer").ToList.FirstOrDefault
The previous example is working fine because "ToList.FirstOrDefault" is
returning an instance of an existing EF class.

What should I do if I want an object having fields of 2 tables as return
type? In other words, is it possible to use for example an inner join of 2
tables and storing the result in an object.

What should I do to achieve this? By default, no EF classes represent an
object with fields of 2 tables.

Please provide a code example to illustrate it.

Thanks!!
 
Back
Top