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.
파일 보기 프로젝트 열기: BellevueCollege/ClassSchedule

공개 메소드들

메소드 설명
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