C# Класс CTCClassSchedule.Common.SubjectInfo

Static helper class to return data related to a given subject.
These helper methods handle common pitfalls such as NullReferenceExceptions for entities which do not exist.
Показать файл Открыть проект

Открытые методы

Метод Описание
GetSubject ( string slug ) : Subject

Finds a Subject based on its slug identifier

GetSubject ( string slug, ClassScheduleDb context ) : Subject

Finds a Subject based on its slug identifier and returns it using the provided ClassScheduleDb

GetSubjectFromPrefix ( string prefix ) : Subject

Takes a course prefix parameter and returns all Subjects which own the prefix Subject entity.

GetSubjectInfo ( string slug ) : SubjectInfoResult

Gathers a Subject's related Department, Division, and SubjectsCoursePrefixs

GetSubjectInfoFromPrefix ( string prefix ) : SubjectInfoResult

Gathers a Subject's related Department, Division, and SubjectsCoursePrefixs

GetSubjectPrefixes ( string slug ) : IList

Gathers a List of SubjectsCoursePrefix based on the Subject's slug identifier

Описание методов

GetSubject() публичный статический Метод

Finds a Subject based on its slug identifier
public static GetSubject ( string slug ) : Subject
slug string The slug identifier for a given
Результат CTCClassSchedule.Models.Subject

GetSubject() публичный статический Метод

Finds a Subject based on its slug identifier and returns it using the provided ClassScheduleDb
public static GetSubject ( string slug, ClassScheduleDb context ) : Subject
slug string The slug identifier for a given
context CTCClassSchedule.Models.ClassScheduleDb The database context to use during the lookup
Результат CTCClassSchedule.Models.Subject

GetSubjectFromPrefix() публичный статический Метод

Takes a course prefix parameter and returns all Subjects which own the prefix Subject entity.
public static GetSubjectFromPrefix ( string prefix ) : Subject
prefix string
Результат CTCClassSchedule.Models.Subject

GetSubjectInfo() публичный статический Метод

Gathers a Subject's related Department, Division, and SubjectsCoursePrefixs
public static GetSubjectInfo ( string slug ) : SubjectInfoResult
slug string The slug identifier for a given
Результат SubjectInfoResult

GetSubjectInfoFromPrefix() публичный статический Метод

Gathers a Subject's related Department, Division, and SubjectsCoursePrefixs
public static GetSubjectInfoFromPrefix ( string prefix ) : SubjectInfoResult
prefix string The prefix identifier for a given
Результат SubjectInfoResult

GetSubjectPrefixes() публичный статический Метод

Gathers a List of SubjectsCoursePrefix based on the Subject's slug identifier
public static GetSubjectPrefixes ( string slug ) : IList
slug string The slug identifier for a given
Результат IList