public ActionResult RemoveBlockedIssn(RemoveBlockedIssnViewModel model) { if (this.ModelState.IsValid) { foreach (var item in model.SelectedItems) { blockedIssnRepository.Delete(blockedIssnRepository.Find(item)); } blockedIssnRepository.Save(); return this.RedirectToAction("RemoveBlockedIssn"); } model.BlockedIssns = blockedIssnRepository.All; return this.View(model); }
public ViewResult RemoveBlockedIssn() { var model = new RemoveBlockedIssnViewModel { BlockedIssns = blockedIssnRepository.All }; return this.View(model); }