public JsonPatchDocument <ApiProductInventoryRequestModel> CreatePatch(ApiProductInventoryRequestModel model) { var patch = new JsonPatchDocument <ApiProductInventoryRequestModel>(); patch.Replace(x => x.Bin, model.Bin); patch.Replace(x => x.LocationID, model.LocationID); patch.Replace(x => x.ModifiedDate, model.ModifiedDate); patch.Replace(x => x.Quantity, model.Quantity); patch.Replace(x => x.Rowguid, model.Rowguid); patch.Replace(x => x.Shelf, model.Shelf); return(patch); }
public virtual ApiProductInventoryRequestModel MapResponseToRequest( ApiProductInventoryResponseModel response) { var request = new ApiProductInventoryRequestModel(); request.SetProperties( response.Bin, response.LocationID, response.ModifiedDate, response.Quantity, response.Rowguid, response.Shelf); return(request); }