public ActionResult OrganizationList() { IOrgRepo orgrepo = OrgRepoFactory.Create(); var model = orgrepo.GetAllOrganizations(); return(View(model.ToList())); }
public HeroVM() { Org = new List <SelectListItem>(); var AllOrgs = orgrepo.GetAllOrganizations(); Sightings = new HashSet <Sighting>(); SelectedOrganizationsID = new List <int>(); foreach (var item in AllOrgs) { Org.Add(new SelectListItem { Value = item.OrganizationID.ToString(), Text = item.OrganizationName }); } }