Separate model and context

Thread is closed for posting
2 posts, 0 answers
  1. Sandr
    Sandr avatar
    4 posts
    Member since:
    Dec 2014

    Posted 30 Jan 2015 Link to this post


    I separated my model and my context, int two differents assemblies, using this method :

    Callers methods stored procedures are no longer generated, perhaps because my context is in a different assembly?
    Have you ever tried this? If so, have you experienced this problem?

    Thank you in advance
  2. Kaloyan Nikolov
    Kaloyan Nikolov avatar
    118 posts

    Posted 04 Feb 2015 Link to this post


    The remote Data Access Domain context is not designed to generate the Domain Methods and the behavior you describe is expedited. It is designed to be a light weight context that you can use in any assembly but use the classes and metadata defined in your model assembly.

    If you want to decouple the context from the other code I would suggest you to manually define an interface then to inherit it in the context generated by Data Access and use the interface in the rest of the code. For the entity classes you should reference the main model assembly anyway. You can also use the interface generated by Data Access. 

    Should you have any further questions do not hesitate to get back to us. 

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