Reference to Telerik.OpenAccess.dll

Thread is closed for posting
2 posts, 0 answers
  1. Manuel
    Manuel avatar
    43 posts
    Member since:
    Jul 2010

    Posted 20 Mar 2014 Link to this post

    Is there a way to separate (put it in different libraries) the Entities and the and the FluentMetadataSource?

    Right now I have to put a reference Telerik.OpenAccess.dll to all my projects. (e.g. DAL and Biz Projects /Libraries)

    Thank you,
  2. Doroteya
    Doroteya avatar
    498 posts

    Posted 25 Mar 2014 Link to this post

    Hello Manuel,

    I am sorry for the inconvenience you are experiencing.

    Generally, the recommended approach for building a class library that holds a fluent model is to place in it the persistent classes, the metadatasource, and the context class. An organization in which the classes are separated from the rest of the model in another assembly is not supported.

    This is necessary, because Telerik Data Access executes a post build task on the persistent classes that injects a variety of runtime features (more details are available here). In other words, in case you separate the classes in a different assembly, the post build task will be skipped and the classes will not behave as expected during runtime.

    On the other hand, such a separation will lead to a runtime exception (OpenAccessException: No metadata has been registered for class '<namespace_name>.<class_name>, <assembly_name>, version=XXX, culture=XXX, publicKeyToken=XXX') once you make a call to the assembly that holds the metadatasource.

    I hope this helps. If you need additional information, do not hesitate to get back to us.

    OpenAccess ORM is now Telerik Data Access. For more information on the new names, please, check out the Telerik Product Map.
Back to Top