Exemplo n.º 1
0
 //
 //SubjectListToSubjectViewList:
 //
 List<SubjectView> SubjectListToSubjectViewList(List<Subject> subjectList)
 {
     List<SubjectView> subjectViewList = new List<SubjectView>();
     foreach (Subject subject in subjectList)
     {
         //convert every subject to SubjectView
         SubjectView subjectView = new SubjectView(subject, IdSpliter);
         //add to subject to the list
         subjectViewList.Add(subjectView);
     }
     return subjectViewList;
 }
Exemplo n.º 2
0
 //
 // GET: /Subject/DeleteSubject
 //
 public ActionResult DeleteSubject()
 {
     List<Subject> subjectList           = _subjectDbContext.dbSet.ToList();
     List<SubjectView> subjectViewList   = new List<SubjectView>();
     foreach (Subject subject in subjectList)
     {
         //convert every subject to SubjectView
         SubjectView subjectView= new SubjectView(subject, IdSpliter);
         //add to subject to the list
         subjectViewList.Add(subjectView);
     }
     return View(subjectViewList);
 }