예제 #1
0
        public ActionResult OrganizationList()
        {
            IOrgRepo orgrepo = OrgRepoFactory.Create();
            var      model   = orgrepo.GetAllOrganizations();

            return(View(model.ToList()));
        }
예제 #2
0
        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
                });
            }
        }