Exemplo n.º 1
0
 public void AddTeacher(ApiTeacherResponseModel item)
 {
     if (!this.Teachers.Any(x => x.Id == item.Id))
     {
         this.Teachers.Add(item);
     }
 }
Exemplo n.º 2
0
        public virtual ApiTeacherRequestModel MapResponseToRequest(
            ApiTeacherResponseModel response)
        {
            var request = new ApiTeacherRequestModel();

            request.SetProperties(
                response.Birthday,
                response.Email,
                response.FirstName,
                response.LastName,
                response.Phone,
                response.UserId);
            return(request);
        }
Exemplo n.º 3
0
        public virtual ApiTeacherResponseModel MapRequestToResponse(
            int id,
            ApiTeacherRequestModel request)
        {
            var response = new ApiTeacherResponseModel();

            response.SetProperties(id,
                                   request.Birthday,
                                   request.Email,
                                   request.FirstName,
                                   request.LastName,
                                   request.Phone,
                                   request.UserId);
            return(response);
        }