Skip to content
Loading
  • Jignesh Kumar
    0
    Hi Pradeep,
     
    Please try below query
    1. if (Filter != " ")    
    2. {    
    3. if (details.Count <= 0)  
    4. {  
    5. details = (from e in Country_Details where e.Country.ToLower().StartsWith(Filter.ToLower()   
    6.                                      && e.Capital.ToLower().StartsWith(Filter.ToLower()  
    7.                                      && e.Region.ToLower().StartsWith(Filter.ToLower()  
    8.                                      && e.S_region.ToLower().StartsWith(Filter.ToLower())   
    9.                                      select e).ToList();    
    10. }
    0
  • Mageshwaran R
    0
    Hi,
    please refer this link:
    https://stackoverflow.com/questions/7548783/net-linq-query-returning-a-single-object 
    0
  • Priyanka K S
    0
    1. if (Filter != " " && details.Count <= 0)    
    2.     {  
    3.     details = (from e in Country_Details where e.Country.ToLower().StartsWith(Filter.ToLower())   
    4.                                             && e.Capital.ToLower().StartsWith(Filter.ToLower())  
    5.                                             && e.Region.ToLower().StartsWith(Filter.ToLower())  
    6.                                             &&e.S_region.ToLower().StartsWith(Filter.ToLower())    
    7.                                             select e).ToList();  
    1.     }
    Please try this. Thanks
    0