コード例 #1
0
        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));
        }
コード例 #2
0
        public IActionResult SearchNama(string keyword)
        {
            var data = _mhs.GetAllByNama(keyword);

            return(View("Index", data));
        }