/// <summary> /// Create a ProjectDTO for the given project. By default, the course /// and groups are not included /// </summary> public ProjectDTO(Project that) { _project = that; this.projectID = that.projectID; this.projectName = that.projectName; this.isActive = that.isActive; this.description = that.description; this.CourseID = that.CourseID; // not included by default this.Course = null; this.groups = null; }
/// <summary> /// Include the project's course in this DTO. May cause cyclic /// reference issues /// </summary> public ProjectDTO WithCourse() { this.Course = new CourseDTO(_project.Course); return(this); }