Exemple #1
0
        public async Task <IViewComponentResult> InvokeAsync(int id)
        {
            var employee = await employeeStore.Find(id);

            if (id == 12)
            {
                return(View("XYZ", employee));
            }
            return(View(employee));
        }
Exemple #2
0
        public async Task <IActionResult> Find([FromQuery] string searchString)
        {
            var employeeList = await _employeeStore.Find(searchString);

            return(Json(employeeList));
        }