Example #1
0
 /// <summary>
 /// Subscribes the user to a channel
 /// </summary>
 /// <param name="channelId"></param>
 /// <returns></returns>
 public ActionResult Subscribe(int channelId, int? userId)
 {
     if (userId.HasValue)
     {
         using (RentItServiceClient proxy = new RentItServiceClient())
         {
             proxy.Subscribe(userId.Value, channelId);
         }
         return Redirect(Request.UrlReferrer.PathAndQuery);
     }
     return RedirectToAction("Index", "Home");
 }