int RoleID = Convert.ToInt32(Role);
var Email = (from contact in dc.tbl_Contact
join usr in dc.tbl_User on contact.ContactID equals usr.ContactID
join usrrole in dc.tbl_UserRole on usr.UserID equals usrrole.UserID
join role in dc.tbl_Role on usrrole.RoleID equals role.RoleID
where contact.IsDelete == false && role.RoleID == RoleID
select new
{
emailcollection = contact.EmailIDOne
});
OR
var xx = from tbl_UserRole ur in (dc.tbl_Role.Where(r => r.RoleID == RoleID).FirstOrDefault().tbl_UserRole)
select new
{
email = ur.tbl_User.tbl_Contact.EmailIDOne
};
var Email = (from contact in dc.tbl_Contact
join usr in dc.tbl_User on contact.ContactID equals usr.ContactID
join usrrole in dc.tbl_UserRole on usr.UserID equals usrrole.UserID
join role in dc.tbl_Role on usrrole.RoleID equals role.RoleID
where contact.IsDelete == false && role.RoleID == RoleID
select new
{
emailcollection = contact.EmailIDOne
});
OR
var xx = from tbl_UserRole ur in (dc.tbl_Role.Where(r => r.RoleID == RoleID).FirstOrDefault().tbl_UserRole)
select new
{
email = ur.tbl_User.tbl_Contact.EmailIDOne
};