public static PlaylistCourse Create(Course course) { var playlistCourse = new PlaylistCourse() { Course = course }; return(playlistCourse); }
public static Playlist Create(PlaylistsTypeEnum type, string title, IList <Course> courses = null) { var playlist = new Playlist() { PlaylistsType = type, Title = title }; if (courses != null) { foreach (var course in courses) { playlist.PlaylistCourses.Add(PlaylistCourse.Create(course)); } } return(playlist); }