DBprojectModel1.DBprojectEntities1 context = new DBprojectModel1.DBprojectEntities1(); lbFullName.Text = from name in context.Pupils where name.UserName.Contains(txtUser.text) select name.FullName;