public JsonPatchDocument <ApiPostTypeRequestModel> CreatePatch(ApiPostTypeRequestModel model) { var patch = new JsonPatchDocument <ApiPostTypeRequestModel>(); patch.Replace(x => x.Type, model.Type); return(patch); }
public virtual ApiPostTypeRequestModel MapResponseToRequest( ApiPostTypeResponseModel response) { var request = new ApiPostTypeRequestModel(); request.SetProperties( response.Type); return(request); }
public virtual ApiPostTypeResponseModel MapRequestToResponse( int id, ApiPostTypeRequestModel request) { var response = new ApiPostTypeResponseModel(); response.SetProperties(id, request.Type); return(response); }