This is a migrated thread and some comments may be shown as answers.

What's the difference EntitiesModel OpenAccessContext

2 Answers 43 Views
Development (API, general questions)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
John
Top achievements
Rank 1
John asked on 05 Feb 2015, 02:38 PM
Hi

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?

Thanks

John

2 Answers, 1 is accepted

Sort by
0
Doroteya
Telerik team
answered on 06 Feb 2015, 08:11 AM
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.


Regards,
Doroteya
Telerik
 
OpenAccess ORM is now Telerik Data Access. For more information on the new names, please, check out the Telerik Product Map.
 
0
John
Top achievements
Rank 1
answered on 06 Feb 2015, 10:14 AM
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.

Thanks
Tags
Development (API, general questions)
Asked by
John
Top achievements
Rank 1
Answers by
Doroteya
Telerik team
John
Top achievements
Rank 1
Share this question
or