public JsonPatchDocument <ApiSaleRequestModel> CreatePatch(ApiSaleRequestModel model)
        {
            var patch = new JsonPatchDocument <ApiSaleRequestModel>();

            patch.Replace(x => x.IpAddress, model.IpAddress);
            patch.Replace(x => x.Note, model.Note);
            patch.Replace(x => x.SaleDate, model.SaleDate);
            patch.Replace(x => x.TransactionId, model.TransactionId);
            return(patch);
        }
        public virtual ApiSaleRequestModel MapResponseToRequest(
            ApiSaleResponseModel response)
        {
            var request = new ApiSaleRequestModel();

            request.SetProperties(
                response.IpAddress,
                response.Note,
                response.SaleDate,
                response.TransactionId);
            return(request);
        }
        public virtual ApiSaleResponseModel MapRequestToResponse(
            int id,
            ApiSaleRequestModel request)
        {
            var response = new ApiSaleResponseModel();

            response.SetProperties(id,
                                   request.IpAddress,
                                   request.Note,
                                   request.SaleDate,
                                   request.TransactionId);
            return(response);
        }