Exemplo n.º 1
0
        public JsonPatchDocument <ApiCountryRequirementRequestModel> CreatePatch(ApiCountryRequirementRequestModel model)
        {
            var patch = new JsonPatchDocument <ApiCountryRequirementRequestModel>();

            patch.Replace(x => x.CountryId, model.CountryId);
            patch.Replace(x => x.Details, model.Details);
            return(patch);
        }
Exemplo n.º 2
0
        public virtual ApiCountryRequirementRequestModel MapResponseToRequest(
            ApiCountryRequirementResponseModel response)
        {
            var request = new ApiCountryRequirementRequestModel();

            request.SetProperties(
                response.CountryId,
                response.Details);
            return(request);
        }
Exemplo n.º 3
0
        public virtual ApiCountryRequirementResponseModel MapRequestToResponse(
            int id,
            ApiCountryRequirementRequestModel request)
        {
            var response = new ApiCountryRequirementResponseModel();

            response.SetProperties(id,
                                   request.CountryId,
                                   request.Details);
            return(response);
        }