public ActionResult RemoveFavorite(int id)
        {
            var result = _userFavoriteService.GetById(id);

            //result.Data.Status = false;
            _userFavoriteService.Delete(result.Data);
            return(RedirectToAction("UserFavorites", result));
        }
Esempio n. 2
0
 public ActionResult removeFavorite(int id, int mid)
 {
     if (Convert.ToInt32(Session["userId"]) == mid)
     {
         _UserFavoriteService.Delete(id);
         return(RedirectToAction("myFavorite", "UserDashboard", new { id = mid }));
     }
     else
     {
         return(RedirectToAction("Index", "UserHome"));
     }
 }
Esempio n. 3
0
 public ActionResult removeFromFavourite(int id)//product id
 {
     _UserFavoriteService.Delete(id, Convert.ToInt32(Session["userId"]));
     return(RedirectToAction("details", new { id = id }));
 }