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); }
public virtual ApiCountryRequirementRequestModel MapResponseToRequest( ApiCountryRequirementResponseModel response) { var request = new ApiCountryRequirementRequestModel(); request.SetProperties( response.CountryId, response.Details); return(request); }
public virtual ApiCountryRequirementResponseModel MapRequestToResponse( int id, ApiCountryRequirementRequestModel request) { var response = new ApiCountryRequirementResponseModel(); response.SetProperties(id, request.CountryId, request.Details); return(response); }