Separate model and context

2 posts, 0 answers
  1. Sandr
    Sandr avatar
    4 posts
    Member since:
    Dec 2014

    Posted 30 Jan 2015 Link to this post

    Hello,

    I separated my model and my context, int two differents assemblies, using this method :
    http://docs.telerik.com/data-access/developers-guide/data-access-domain-model/managing-the-openaccesscontext/data-access-tasks-create-data-access-context

    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
    Admin
    Kaloyan Nikolov avatar
    118 posts

    Posted 04 Feb 2015 Link to this post

    Hello,

    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. 

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