コード例 #1
0
        public virtual ApiEmployeeDepartmentHistoryRequestModel MapResponseToRequest(
            ApiEmployeeDepartmentHistoryResponseModel response)
        {
            var request = new ApiEmployeeDepartmentHistoryRequestModel();

            request.SetProperties(
                response.DepartmentID,
                response.EndDate,
                response.ModifiedDate,
                response.ShiftID,
                response.StartDate);
            return(request);
        }
コード例 #2
0
        public virtual ApiEmployeeDepartmentHistoryResponseModel MapRequestToResponse(
            int businessEntityID,
            ApiEmployeeDepartmentHistoryRequestModel request)
        {
            var response = new ApiEmployeeDepartmentHistoryResponseModel();

            response.SetProperties(businessEntityID,
                                   request.DepartmentID,
                                   request.EndDate,
                                   request.ModifiedDate,
                                   request.ShiftID,
                                   request.StartDate);
            return(response);
        }
コード例 #3
0
        public JsonPatchDocument <ApiEmployeeDepartmentHistoryRequestModel> CreatePatch(ApiEmployeeDepartmentHistoryRequestModel model)
        {
            var patch = new JsonPatchDocument <ApiEmployeeDepartmentHistoryRequestModel>();

            patch.Replace(x => x.DepartmentID, model.DepartmentID);
            patch.Replace(x => x.EndDate, model.EndDate);
            patch.Replace(x => x.ModifiedDate, model.ModifiedDate);
            patch.Replace(x => x.ShiftID, model.ShiftID);
            patch.Replace(x => x.StartDate, model.StartDate);
            return(patch);
        }