Hi,
we're created a PropertyDataResolverProvider for our custom propertyeditor. The contet id resolving works using
PersistenceManager.Default.GetUniqueId(linkPicker.MediaId, NodeObjectTypes.Media);
But we get an obsolete warning on PersistenceManager.Default as "please try not to use this manager...". For safety we set PersistenceManager.Default.ExecutionContext = this.ExecutionContext;
But we like to implement our dataresolver the proper way and are looking for an alternative for the PersistenceManager to translate from nodeid to guid and back. Who can provide us a hint ?
Bart
ps. we implemented the dataresolver on top of UaaS version of Courier
Yes. The issue is just the obsolete warning. Things have been working fine. I just wanted to know the right way to use the PersistenceManager. I've been doing things like this:
var nodeId = PersistenceManager.Default.GetNodeId(transferGuid, NodeObjectTypes.Document);
I get little warnings that say "Umbraco.Courier.Core.PersistenceManager.Default is obsolete: Please try not to using this manager, as it does not have an execution context, unless you specify it"
I just tried throwing in
var defaultPersistence = PersistenceManager.GetDefault(this)
but the solution won't build because PersistenceManager doesn't appear to have a GetDefault(...) method.
Obsolete PersistenceManager.Default alternative ?
Hi, we're created a PropertyDataResolverProvider for our custom propertyeditor. The contet id resolving works using PersistenceManager.Default.GetUniqueId(linkPicker.MediaId, NodeObjectTypes.Media);
But we get an obsolete warning on PersistenceManager.Default as "please try not to use this manager...". For safety we set PersistenceManager.Default.ExecutionContext = this.ExecutionContext;
But we like to implement our dataresolver the proper way and are looking for an alternative for the PersistenceManager to translate from nodeid to guid and back. Who can provide us a hint ?
Bart
ps. we implemented the dataresolver on top of UaaS version of Courier
bump !
I wonder about this as well. Any ideas anyone?
Thanks
@Mark
Can you simple do this as we do internally?
Or perhaps a bit of code to illustrate the issue. Is it *just* the obsolete message?
I think you may be using an outdated version of Courier for UaaS. Get in touch if this is for a UaaS site and we'll get it updated for you.
-Paul
Yes. The issue is just the obsolete warning. Things have been working fine. I just wanted to know the right way to use the PersistenceManager. I've been doing things like this:
I get little warnings that say "Umbraco.Courier.Core.PersistenceManager.Default is obsolete: Please try not to using this manager, as it does not have an execution context, unless you specify it"
I just tried throwing in
but the solution won't build because PersistenceManager doesn't appear to have a GetDefault(...) method.
is working on a reply...