Ejemplo n.º 1
0
 public ActionResult Become(int id)
 {
     var viewModel = new MembersBecomeViewModel
     {
         GroupId = id,
     };
     return View(viewModel);
 }
Ejemplo n.º 2
0
 public ActionResult Become(MembersBecomeViewModel viewModel)
 {
     if (ModelState.IsValid)
     {
         queryService.CreateQuery(new GroupQuery
         {
             GroupId = viewModel.GroupId,
             Message = viewModel.Message,
             UserId = (int)Membership.GetUser().ProviderUserKey,
         });
         return Redirect("/groups/not-member-of/");
     }
     return View(viewModel);
 }