public JsonResult GetSelectListNetworks() { if (!WebSecurity.IsAuthenticated) { return(null); } var list = reposetory.GetAllNetworks().Where(n => n.NetworkNotToShow != true).OrderBy(a => a.NetworkName); return(Json(new SelectList(list.ToArray(), "NetworkID", "NetworkName"), JsonRequestBehavior.AllowGet)); }
public ActionResult Index() { List <Network> networks = reposetory.GetAllNetworks(); return(View(networks)); }