public IActionResult ViewItem(string category, string slugurl) { var model = _projectEngine.GetItem(_userManager.GetUserId(User), category, slugurl); ViewBag.Title = model.Item.Title; return(View(model)); }
public IActionResult RedirectNotification(Guid id) { var notification = _notificationService.GetNotification(id); if (notification != null) { switch (notification.NotificationTypeId) { case (int)NotificationTypes.CreateOffer: case (int)NotificationTypes.ReceivedOffer: case (int)NotificationTypes.AcceptOffer: case (int)NotificationTypes.ReceivedAcceptOffer: case (int)NotificationTypes.CreateItem: case (int)NotificationTypes.EditItem: if (notification.ItemID.HasValue) { var item = _projectEngine.GetItem(notification.ItemID.Value); return(RedirectToRoute("viewItem", new { category = item.Category.SlugUrl, slugurl = item.SlugUrl })); } break; } } return(RedirectToRoute("account")); }