C# Class Ru.GameSchool.BusinessLayer.Services.CourseService

Service class that abstracts the interraction around the course entity with the data layer.
Inheritance: BaseService
Datei anzeigen Open project: davidein/Ru.GameSchool Class Usage Examples

Public Methods

Method Description
AddCourseGrade ( CourseGrade courseGrade ) : void

Gets a courseGrade instance through a parameter of this function and if it isn't null persist it to the database.

AddUserToCourse ( int userInfoId, int courseId, ResponseStatus &responseStatus ) : string
CreateCourse ( Course course ) : void

Gets a course instance through a parameter of this function and if it isn't null persist it to the database.

GetContentTypeNameById ( int contentTypeId ) : string
GetCourse ( int courseId ) : Course

Gets a Course entity by CourseId

GetCourseGradeByCourseIdAndUserInfoId ( int courseId, int userInfoId ) : CourseGrade

Gets the grade of a certain user in a course

GetCourseGrades ( int courseId ) : IEnumerable

Gets a list of all grades in a course

GetCourseMaterials ( int courseId ) : IEnumerable
GetCourseMaterials ( int courseId, int contentTypeId ) : IEnumerable
GetCourseNewestItems ( int courseId, int userInfoId ) : IEnumerable
GetCourses ( ) : IEnumerable

Gets all registered Courses

GetCoursesByUserInfoId ( int userInfoId ) : IEnumerable
GetCoursesByUserInfoIdAndCourseId ( int userInfoId, int courseId ) : IEnumerable

GetCurrentUserLevel ( int userInfoId, int courseId ) : int

Gets current level by UserInfoId and CourseId

GetDepartments ( ) : IEnumerable

Gets all registered Departments

Search ( string search ) : IEnumerable
UpdateCourse ( Course course ) : void
UpdateCourseGrade ( CourseGrade courseGrade ) : void

Method Details

AddCourseGrade() public method

Gets a courseGrade instance through a parameter of this function and if it isn't null persist it to the database.
public AddCourseGrade ( CourseGrade courseGrade ) : void
courseGrade Ru.GameSchool.DataLayer.Repository.CourseGrade
return void

AddUserToCourse() public method

public AddUserToCourse ( int userInfoId, int courseId, ResponseStatus &responseStatus ) : string
userInfoId int
courseId int
responseStatus ResponseStatus
return string

CreateCourse() public method

Gets a course instance through a parameter of this function and if it isn't null persist it to the database.
public CreateCourse ( Course course ) : void
course Ru.GameSchool.DataLayer.Repository.Course Instance of a course
return void

GetContentTypeNameById() public method

public GetContentTypeNameById ( int contentTypeId ) : string
contentTypeId int
return string

GetCourse() public method

Gets a Course entity by CourseId
public GetCourse ( int courseId ) : Course
courseId int Id of the course to get.
return Ru.GameSchool.DataLayer.Repository.Course

GetCourseGradeByCourseIdAndUserInfoId() public method

Gets the grade of a certain user in a course
public GetCourseGradeByCourseIdAndUserInfoId ( int courseId, int userInfoId ) : CourseGrade
courseId int Id of the Course to get the grade for.
userInfoId int
return Ru.GameSchool.DataLayer.Repository.CourseGrade

GetCourseGrades() public method

Gets a list of all grades in a course
public GetCourseGrades ( int courseId ) : IEnumerable
courseId int Id of the course to get grades for.
return IEnumerable

GetCourseMaterials() public method

public GetCourseMaterials ( int courseId ) : IEnumerable
courseId int
return IEnumerable

GetCourseMaterials() public method

public GetCourseMaterials ( int courseId, int contentTypeId ) : IEnumerable
courseId int
contentTypeId int
return IEnumerable

GetCourseNewestItems() public method

public GetCourseNewestItems ( int courseId, int userInfoId ) : IEnumerable
courseId int
userInfoId int
return IEnumerable

GetCourses() public method

Gets all registered Courses
public GetCourses ( ) : IEnumerable
return IEnumerable

GetCoursesByUserInfoId() public method

public GetCoursesByUserInfoId ( int userInfoId ) : IEnumerable
userInfoId int
return IEnumerable

GetCoursesByUserInfoIdAndCourseId() public method

public GetCoursesByUserInfoIdAndCourseId ( int userInfoId, int courseId ) : IEnumerable
userInfoId int
courseId int
return IEnumerable

GetCurrentUserLevel() public method

Gets current level by UserInfoId and CourseId
public GetCurrentUserLevel ( int userInfoId, int courseId ) : int
userInfoId int Id of the User to get current level for.
courseId int Id of the Course to get current level for.
return int

GetDepartments() public method

Gets all registered Departments
public GetDepartments ( ) : IEnumerable
return IEnumerable

Search() public method

public Search ( string search ) : IEnumerable
search string
return IEnumerable

UpdateCourse() public method

public UpdateCourse ( Course course ) : void
course Ru.GameSchool.DataLayer.Repository.Course
return void

UpdateCourseGrade() public method

public UpdateCourseGrade ( CourseGrade courseGrade ) : void
courseGrade Ru.GameSchool.DataLayer.Repository.CourseGrade
return void