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

            patch.Replace(x => x.GroupName, model.GroupName);
            patch.Replace(x => x.ModifiedDate, model.ModifiedDate);
            patch.Replace(x => x.Name, model.Name);
            return(patch);
        }
Example #2
0
        public virtual ApiDepartmentRequestModel MapResponseToRequest(
            ApiDepartmentResponseModel response)
        {
            var request = new ApiDepartmentRequestModel();

            request.SetProperties(
                response.GroupName,
                response.ModifiedDate,
                response.Name);
            return(request);
        }
Example #3
0
        public virtual ApiDepartmentResponseModel MapRequestToResponse(
            short departmentID,
            ApiDepartmentRequestModel request)
        {
            var response = new ApiDepartmentResponseModel();

            response.SetProperties(departmentID,
                                   request.GroupName,
                                   request.ModifiedDate,
                                   request.Name);
            return(response);
        }