public ShortUserDetails GetUserShortDetailById(string userId) { var user = this.Context.Users.Find(userId); ShortUserDetails vm = Mapper.Map <ApplicationUser, ShortUserDetails>(user); return(vm); }
public ActionResult UnBan(string userId) { if (!this.service.UserExists(userId)) { return(this.HttpNotFound("User not Found")); } ShortUserDetails vm = this.service.GetUserShortDetailById(userId); return(this.View("UnBanConfirmation", vm)); }
public ActionResult UnBanPost(string userId) { if (!this.service.UserExists(userId)) { return(this.HttpNotFound("User not Found")); } ShortUserDetails vm = this.service.GetUserShortDetailById(userId); this.service.UnBanUser(userId); return(this.RedirectToAction("Users")); }