Exemple #1
0
        public JsonPatchDocument <ApiStudentXFamilyRequestModel> CreatePatch(ApiStudentXFamilyRequestModel model)
        {
            var patch = new JsonPatchDocument <ApiStudentXFamilyRequestModel>();

            patch.Replace(x => x.FamilyId, model.FamilyId);
            patch.Replace(x => x.StudentId, model.StudentId);
            return(patch);
        }
Exemple #2
0
        public virtual ApiStudentXFamilyRequestModel MapResponseToRequest(
            ApiStudentXFamilyResponseModel response)
        {
            var request = new ApiStudentXFamilyRequestModel();

            request.SetProperties(
                response.FamilyId,
                response.StudentId);
            return(request);
        }
Exemple #3
0
        public virtual ApiStudentXFamilyResponseModel MapRequestToResponse(
            int id,
            ApiStudentXFamilyRequestModel request)
        {
            var response = new ApiStudentXFamilyResponseModel();

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