DbContext template - default namespace

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
smokeing
Posts: 23
Joined: Fri 09 Oct 2015 00:51

DbContext template - default namespace

Post by smokeing » Sun 08 Nov 2015 23:36

Hi,

how to specify namespace for generated entities and context classes?
There is an option "Entities Output" but you can only specify project and project folder.
We are looking for this, because we would like to exclude them from code coverage analysis.

smokeing

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: DbContext template - default namespace

Post by MariiaI » Mon 09 Nov 2015 11:22

Open Properties for your model (for example, right-click the diagram layout and select Properties) and:
1) For context class: set Entity Container Namespace, for example, to MyNamespaceModel;
2) For entities: set Namespace, for example, to MyNamespaceModel_Entities;
3) Save the changes to regenerate the code.

Another way is to make it via Model Settings ( double-click the diagram layout):
1) set Entity Container in the following way: MyNamespaceModel.MyContext
2) set Namespace in the following way: MyNameSpace_Entities

Please refer to the corresponding Entity Developer documentation:
http://www.devart.com/entitydeveloper/e ... eloper.chm > ORM Support -> Entity Framework -> Reference -> Dialog Windows -> Model Settings
http://www.devart.com/entitydeveloper/e ... eloper.chm > ORM Support -> Entity Framework -> Reference -> Model Properties

JIC: Entity Developer documentation is also available with the installation package (the "Help" component should have been selected when installing).

smokeing
Posts: 23
Joined: Fri 09 Oct 2015 00:51

Re: DbContext template - default namespace

Post by smokeing » Mon 09 Nov 2015 16:50

Thank you very much!

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: DbContext template - default namespace

Post by MariiaI » Tue 10 Nov 2015 08:33

If we can assist you any further, don't hesitate to contact us.

Post Reply