Exemple #1
0
 public void AddRate(ApiRateResponseModel item)
 {
     if (!this.Rates.Any(x => x.Id == item.Id))
     {
         this.Rates.Add(item);
     }
 }
        public virtual ApiRateRequestModel MapResponseToRequest(
            ApiRateResponseModel response)
        {
            var request = new ApiRateRequestModel();

            request.SetProperties(
                response.AmountPerMinute,
                response.TeacherId,
                response.TeacherSkillId);
            return(request);
        }
        public virtual ApiRateResponseModel MapRequestToResponse(
            int id,
            ApiRateRequestModel request)
        {
            var response = new ApiRateResponseModel();

            response.SetProperties(id,
                                   request.AmountPerMinute,
                                   request.TeacherId,
                                   request.TeacherSkillId);
            return(response);
        }