예제 #1
0
 public void AddLessonXStudent(ApiLessonXStudentResponseModel item)
 {
     if (!this.LessonXStudents.Any(x => x.Id == item.Id))
     {
         this.LessonXStudents.Add(item);
     }
 }
        public virtual ApiLessonXStudentRequestModel MapResponseToRequest(
            ApiLessonXStudentResponseModel response)
        {
            var request = new ApiLessonXStudentRequestModel();

            request.SetProperties(
                response.LessonId,
                response.StudentId);
            return(request);
        }
        public virtual ApiLessonXStudentResponseModel MapRequestToResponse(
            int id,
            ApiLessonXStudentRequestModel request)
        {
            var response = new ApiLessonXStudentResponseModel();

            response.SetProperties(id,
                                   request.LessonId,
                                   request.StudentId);
            return(response);
        }