public ActionResult Index(long SearchtermCnic=0,long SearchtermMobile=0) { if (SearchtermCnic == 0 && SearchtermMobile==0) { RedirectToAction("Index"); } if (SearchtermMobile == 0) { CustomerClass custcls = new CustomerClass(); List<Customer> cust = custcls.FindCustomer(SearchtermCnic); return View(cust); } else { MehriamarqueeEntities meh = new MehriamarqueeEntities(); List<Customer> cust = meh.Customers.Where(X=>X.mobileNo== SearchtermMobile).ToList(); return View(cust); } }