예제 #1
0
        public async Task <IActionResult> OperationSearch(string name)
        {
            if (name == null)
            {
                return(RedirectToAction(nameof(Error), new { message = "Name is null" }));
            }
            var obj = await _operatorService.FindByNameAsync(name);

            if (obj.Count() == 0)
            {
                return(RedirectToAction(nameof(Error), new { message = "Name not found" }));
            }
            return(View(obj));
        }