Amit Shrivastava

Amit Shrivastava

  • NA
  • 293
  • 209.6k

How to use joins in MVC 5 using EF

Aug 17 2015 6:10 AM
Hi
How can i use Inner join in MVC 5 and display in View i had put Query
var q = (from pd in db.tblRegistration
join od in db.tblCountry on pd.FkCountryId equals od.CountryId
orderby od.CountryId
select new
{
od.CountryName,
pd.FirstName,
pd.LastName,
pd.PhoneNo,
pd.PostalCode

}).ToList(); 
 
but in View how can i display plz help me?? i am new in mvc-5
thanks

Answers (1)