var ST= (from obj in dbEntity.Myname_TTL where obj.myName == MyNAME select obj.myName).ToList(); if (ST== 0) {} else {}
var ST= (from obj in dbEntity.Myname_TTL where obj.myName == MyNAME select obj.myName).ToList(); // here you have List ST //to check item count of the list you can use Count if(ST.Count()>0) { // there are matching items, do something ... }else { // no matching items }
Any
if(ST.Any()) { // there are matching items, do something ... }else { // no matching items }
if(((from obj in dbEntity.Myname_TTL where obj.myName == comboBox1.SelectedText select obj.myName).ToList().Count())>0); { } else { }
var ST = (from obj in dbEntity.Myname_TTL where obj.myName.ToLower().Equals(MyNAME.ToLower()) select obj.myName).ToList(); if (ST == 0) { } else { }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)