예제 #1
0
        public IActionResult Index(string id, string search)
        {
            List <ContactModel> listeContacts;

            if (id != null)
            {
                ViewBag.message = id;
            }
            if (search == null)
            {
                listeContacts = ContactModel.GetAllContacts();
            }
            else
            {
                listeContacts = ContactModel.GetContactsBySearch(search);
            }
            return(View(listeContacts));
        }