// GET: Armies public ActionResult Index() { List <ArmyBLL> armies = null; try { using (ContextBLL ctx = new ContextBLL()) { armies = ctx.ArmiesGetAll(Constants.DefaultPageNumber, Constants.DefaultPageSize); } } catch (Exception oops) { Error.Log(oops); return(View("Error", oops)); } return(View(armies)); }
// GET: ArmyModels public ActionResult Index() { if (!User.IsInRole("Developer") && !User.IsInRole("Administrator")) { return(RedirectToAction("MyIndex")); } List <ArmyBLL> armies = null; try { using (ContextBLL ctx = new ContextBLL()) { armies = ctx.ArmiesGetAll(Constants.DefaultPageNumber, Constants.DefaultPageSize); } } catch (Exception oops) { Error.Log(oops); return(View("Error", oops)); } return(View(armies)); }