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

            patch.Replace(x => x.Demographic, model.Demographic);
            patch.Replace(x => x.ModifiedDate, model.ModifiedDate);
            patch.Replace(x => x.Name, model.Name);
            patch.Replace(x => x.Rowguid, model.Rowguid);
            patch.Replace(x => x.SalesPersonID, model.SalesPersonID);
            return(patch);
        }
Ejemplo n.º 2
0
        public virtual ApiStoreRequestModel MapResponseToRequest(
            ApiStoreResponseModel response)
        {
            var request = new ApiStoreRequestModel();

            request.SetProperties(
                response.Demographic,
                response.ModifiedDate,
                response.Name,
                response.Rowguid,
                response.SalesPersonID);
            return(request);
        }
Ejemplo n.º 3
0
        public virtual ApiStoreResponseModel MapRequestToResponse(
            int businessEntityID,
            ApiStoreRequestModel request)
        {
            var response = new ApiStoreResponseModel();

            response.SetProperties(businessEntityID,
                                   request.Demographic,
                                   request.ModifiedDate,
                                   request.Name,
                                   request.Rowguid,
                                   request.SalesPersonID);
            return(response);
        }