Orchard: Using InfosetPart to store "Data" in orchard_framework_contentitemversionrecord

StackOverflow https://stackoverflow.com/questions/22724067

  •  23-06-2023
  •  | 
  •  

Pregunta

After reading Bertrand Le Roy's Blog about the shift to document storage, the InfosetPart in Orchard 1.8 and understanding some of the upgraded Modules in Orchard 1.8 "1.x" source code i have successfully made some of my modules compatible with Orchard 1.8.

But i am having a hard time understanding how the same scheme of document storage would work for ContentPartVersionRecord types so that my content part's data start persisting in "Data" column of orchard_framework_contentitemversionrecord table.

I would be highly thankful for any guidance.

¿Fue útil?

Solución

If you want to store your data versioned in the infoset just use the overload of Store/Retrieve in your part that lets you set versioned = true, e.g.:

Store<TPart, TProperty>(this TPart contentPart, Expression<Func<TPart, TProperty>> targetExpression, TProperty value, bool versioned = false)
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top