Exemple #1
0
        public JsonPatchDocument <ApiSalesTerritoryRequestModel> CreatePatch(ApiSalesTerritoryRequestModel model)
        {
            var patch = new JsonPatchDocument <ApiSalesTerritoryRequestModel>();

            patch.Replace(x => x.CostLastYear, model.CostLastYear);
            patch.Replace(x => x.CostYTD, model.CostYTD);
            patch.Replace(x => x.CountryRegionCode, model.CountryRegionCode);
            patch.Replace(x => x.@Group, model.@Group);
            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.SalesLastYear, model.SalesLastYear);
            patch.Replace(x => x.SalesYTD, model.SalesYTD);
            return(patch);
        }
Exemple #2
0
        public virtual ApiSalesTerritoryRequestModel MapResponseToRequest(
            ApiSalesTerritoryResponseModel response)
        {
            var request = new ApiSalesTerritoryRequestModel();

            request.SetProperties(
                response.CostLastYear,
                response.CostYTD,
                response.CountryRegionCode,
                response.@Group,
                response.ModifiedDate,
                response.Name,
                response.Rowguid,
                response.SalesLastYear,
                response.SalesYTD);
            return(request);
        }