Exemplo n.º 1
0
        public async Task <ActionResult> lecturer(string RegNo)
        {
            if (!string.IsNullOrEmpty(RegNo))
            {
                Lecturer lecturer = await _lecturerService.GetByRegNoAsync(RegNo);

                if (lecturer != null)
                {
                    return(View(lecturer));
                }
            }
            TempData["error"] = "No Lecturer with such RegNo was found";
            return(RedirectToAction("lecturers"));
        }