Gaurav Raj

Gaurav Raj

  • 1.4k
  • 475
  • 34k

How can convert these query in entityframework

Sep 22 2018 1:45 AM
public new List<Profile1> Profile(int id)
var q = from a in db.RegisterTables
where a.Id == id
select
new Profile1
{
Name = a.F_Name + ' ' + a.L_Name,
Email_Id = a.Email_Id,
gender = a.Gender,
DateJoin = a.DateJoin.ToString(),
Location = a.Counttry,
UserName = a.UserName,
DOB = a.DOB.ToString(),
About_Me = a.AboutYou,
BlogPic = a.Pic
};
return q.ToList();
}

Answers (5)