コード例 #1
0
        public JsonPatchDocument <ApiTeacherXTeacherSkillRequestModel> CreatePatch(ApiTeacherXTeacherSkillRequestModel model)
        {
            var patch = new JsonPatchDocument <ApiTeacherXTeacherSkillRequestModel>();

            patch.Replace(x => x.TeacherId, model.TeacherId);
            patch.Replace(x => x.TeacherSkillId, model.TeacherSkillId);
            return(patch);
        }
コード例 #2
0
        public virtual ApiTeacherXTeacherSkillRequestModel MapResponseToRequest(
            ApiTeacherXTeacherSkillResponseModel response)
        {
            var request = new ApiTeacherXTeacherSkillRequestModel();

            request.SetProperties(
                response.TeacherId,
                response.TeacherSkillId);
            return(request);
        }
コード例 #3
0
        public virtual ApiTeacherXTeacherSkillResponseModel MapRequestToResponse(
            int id,
            ApiTeacherXTeacherSkillRequestModel request)
        {
            var response = new ApiTeacherXTeacherSkillResponseModel();

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