Skip to content

write join using lambada expression

February 19, 2011

Int64 productInfoId = 0;
using (var etgEntities = new DBETNetEntities())
{

var result = from profile in etgEntities.TbUserProfile
join product in etgEntities.tbProductInfo
on profile.UserInfoID equals product.UserInfoID
where profile.UserProfileID == userProfileId
select product;

productInfoId = result.FirstOrDefault().ProductInfoId;
}
return productInfoId;

Advertisement
No comments yet

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.