AdFactum ObjectMapper .NET Blog

Official blog of the AdFactum ObjectMapper .NET

Exception: PersisterDoesNotSupportRepositoryException

Posted by Gerhard Stephan on April 17th, 2008

The PersisterDoesNotSupportRepositoryException will be thrown by the XmlPersister if you try to access the Repository of the ObjectMapper class.

The Repository interface is especially designed for use with relational databases and therefore not accessible when using the XmlPersister.

      string file = Directory.GetCurrentDirectory() + "\\XmlTest.xml";

      XmlPersister persister = new XmlPersister("XmlTest", file);

      AdFactum.Data.ObjectMapper xmlMapper = new AdFactum.Data.ObjectMapper(new UniversalFactory(), persister, Transactions.Manual);

 

            IRepository repository = xmlMapper.Repository;

 

 

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>