public async Task <IActionResult> Detail(int id) { if (id <= 0) { return(RedirectToNotFoundPage()); } try { var shortcut = await _shortcutService.FindAsync(new IdRequestFilter <int> { Id = id, CanGetInactived = true }); if (shortcut == null) { return(RedirectToNotFoundPage()); } var model = new ShortcutModel { Description = shortcut.Description, Name = shortcut.Name, Icon = shortcut.Icon, TypeId = (ShortcutType)shortcut.TypeId, Url = shortcut.Url, Id = shortcut.Id, Order = shortcut.Order, StatusId = (ShortcutStatus)shortcut.StatusId }; return(View(model)); } catch (Exception) { return(RedirectToErrorPage()); } }