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