private void Init() { _processed = new Dictionary <Person, JsonItem>(); _persons = _personRepository.GetAll().ToList(); _marriages = _marriageRepository.GetAll().ToList(); _sons = _sonRepository.GetAll().ToList(); }
public IActionResult Index() { var people = _personRepository.GetAll(); var marriages = _marriageRepository.GetAll(); var sons = _sonRepository.GetAll(); ViewBag.people = Utils.GetPersonsSelectList(people); ViewBag.marriages = Utils.GetMarriagesSelectList(marriages, people); ViewBag.sons = Utils.GetSonsSelectList(sons, marriages, people); return(View()); }