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

            patch.Replace(x => x.ActualEndDate, model.ActualEndDate);
            patch.Replace(x => x.ActualStartDate, model.ActualStartDate);
            patch.Replace(x => x.BillAmount, model.BillAmount);
            patch.Replace(x => x.EventStatusId, model.EventStatusId);
            patch.Replace(x => x.ScheduledEndDate, model.ScheduledEndDate);
            patch.Replace(x => x.ScheduledStartDate, model.ScheduledStartDate);
            patch.Replace(x => x.StudentNote, model.StudentNote);
            patch.Replace(x => x.TeacherNote, model.TeacherNote);
            return(patch);
        }
Example #2
0
        public virtual ApiEventRequestModel MapResponseToRequest(
            ApiEventResponseModel response)
        {
            var request = new ApiEventRequestModel();

            request.SetProperties(
                response.ActualEndDate,
                response.ActualStartDate,
                response.BillAmount,
                response.EventStatusId,
                response.ScheduledEndDate,
                response.ScheduledStartDate,
                response.StudentNote,
                response.TeacherNote);
            return(request);
        }