public IActionResult Search(string keyword, string milih) { IEnumerable <Mahasiswa> data; if (milih == "NIM") { data = _mhs.GetAllByNim(keyword); } else if (milih == "Nama") { data = _mhs.GetAllByNama(keyword); } else { data = _mhs.GetAll(); } return(View("Index", data)); }
public IActionResult Search(string keyword) { var data = _mhs.GetAllByNim(keyword); return(View("Index", data)); }