public IActionResult GetCathedra() { CathedraModel newModel = new CathedraModel(); newModel.newList = cathedra.GetAll().ToList(); return(View("~/Views/EducationalDepartment/Cathedra/Cathedra.cshtml", newModel)); }
protected override void AfterDataLoaded() { base.AfterDataLoaded(); Faculties = DataSource as List<FacultyDTO>; CathedraDTO cathedra = originalEntity as CathedraDTO; if (cathedra.Exists()) { cathedra.Faculty = (from faculty in faculties where faculty.ID == OriginalCathedra.FacultyID select faculty).FirstOrDefault(); } Model = new CathedraModel(cathedra); Model.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(ModelPropertyChanged); }