using only stored procedures and no persistent classes

Thread is closed for posting
2 posts, 1 answers
  1. Bill
    Bill avatar
    21 posts
    Member since:
    May 2008

    Posted 22 Nov 2009 Link to this post

    Hi,

    I do not want to use persistent classes. I only want to use custom stored procedures and have the orm use them. I have a DataAccess.dll assembly and  have used the orm tool to create the StoredProcedure.vb class which has static wrappers to all of my custom stored procedures. I have the DataAccess.dll assemblies app.config set as an imbedded resource.

    I have a wpf application setup to use the orm assemblies and it has adjusted the app.config file. The wpf application references the DataAccess.dll file and it compiles with no errors. However, when I run the project, I get the following error:

    Telerik.OpenAccess.Exceptions.InvalidOperationException was unhandled
      Message="No persistent class could be found.\r\nTo define persistent classes use the [Persistent] attribute at the class level.\r\nIf multiple projects are used additional references must be made in the configuration file.\r\nTo update the required references use 'Update Config References' from the OpenAccess menu."
      Source="Telerik.OpenAccess"
      CanRetry=true

    How do I configure my DataAccess.dll assembly and my wpf application to not use persistent classes and only use the orm to use custom stored procedures. Again, I do not want to use any persistent classes, I only want to use custom stored procedures that are wrapped in the StoredProcedure.vb class.

    Bill

  2. Answer
    PetarP
    Admin
    PetarP avatar
    754 posts

    Posted 23 Nov 2009 Link to this post

    Hello Bill,

    The problem comes from that Telerik OpenAccess ORM needs persistent classes to operate. Currently having no persistent classes in an enhanced project is not supported. The workaround would be to create a dummy class and mark it as persistent. Remember to set the Update database property of your project to false as you do not want this dummy class to end up in your database.

    Best wishes,
    Petar
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top