public void showListSubjectofDepartment(List <SubjectModel> subjects)
 {
     this.Dispatcher.Invoke(() =>
     {
         icListSubject.ItemsSource = ListSubjectofDepartmentContext.FromSubject(subjects, GoToSubjectDetail);
     });
 }
        public static List <ListSubjectofDepartmentContext> FromSubject(List <SubjectModel> subjectofDepartment, Action <SubjectModel> goToSubjectDetail)
        {
            var list = new List <ListSubjectofDepartmentContext>();

            foreach (var summary in subjectofDepartment)
            {
                var context = new ListSubjectofDepartmentContext
                {
                    Subject  = summary,
                    _command = new ListSubjectofDepartmentCommand(goToSubjectDetail)
                };
                list.Add(context);
            }
            return(list);
        }