using System.Data.SqlClient;
using System.Threading.Tasks;
using System.Collections.Generic;
public string CustomerName {get;set;}
public string ContactName {get;set;}
public static async Task Main()
List<Customer> cust = new List<Customer>();
cust.Add(new Customer{CustomerName ="sam",ContactName = "mmm"});
cust.Add(new Customer{CustomerName ="mmm",ContactName = "sam"});
cust = cust.Where(p => p.CustomerName.ToLower().Contains(str.ToLower())).ToList();
cust = cust.Where(p => p.ContactName.ToLower().Contains(str.ToLower())).ToList();
foreach(var item in cust)
Console.Write($"Customer name : {item.CustomerName} ", item.CustomerName);
Console.Write($"Contact name : {item.ContactName} ", item.ContactName);