What's the difference EntitiesModel OpenAccessContext

Thread is closed for posting
3 posts, 0 answers
  1. John
    John avatar
    2 posts
    Member since:
    Feb 2013

    Posted 05 Feb 2015 Link to this post


    I have just started with data access. I used the wizard to create a model from my database and have successfully read data from the database.

    I'm a little confused I'm using  the generated context 'DbContext : OpenAccessContext, IDbContextUnitOfWork' to get the data.

    I am looking at some other examples and they use EntitiesModel context = new EntitiesModel().

    What is the difference and which should be used?



  2. Doroteya
    Doroteya avatar
    498 posts

    Posted 06 Feb 2015 Link to this post

    Hi John,

    Thank you for your interest in Telerik Data Access.

    EntitiesModel is the name of the context, provided by default from the New Domain Model wizard when the model is generated. DbContext will be the name of your context class, if you had specified it in the Model Name textbox on the Select Domain Model Type page of the wizard. The documentation of Data Access by design demonstrates code snippets with the default name of the context class, which is the reason why you see this name so often. The point behind this decision is that this way the scenarios are quickly and easily reproducible on your side.

    I hope this helps. Do let us know, if you need further information or assistance.

    OpenAccess ORM is now Telerik Data Access. For more information on the new names, please, check out the Telerik Product Map.
  3. John
    John avatar
    2 posts
    Member since:
    Feb 2013

    Posted 06 Feb 2015 in reply to Doroteya Link to this post

    Ah yes thank you, that's makes sense I think I was following one of the getting started video's and they named it DbContext.

Back to Top