NewBie (add amendment & background)

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
wti
Posts: 2
Joined: Thu 09 Aug 2018 08:27

NewBie (add amendment & background)

Post by wti » Thu 09 Aug 2018 11:11

Hi @ll,

I'm doing my first steps with a Trial Version of Entity Developer.
Of course I have a special idea of the functionality and a set of results from the programmers.
Hopefully someone can give me a solution / an answer of my questions.

First I’m not able to work with Entity Developer as a plugin of Visual Studio 2015. I’ve no option to create a new Diagram/Model. Is it necessary to select a special kind of project type?
Our project has already been created by the programming and I have taken over the structure and all existing files/setting via git.

I create Complex Types with a list of columns/properties and other Complex Types and insert them in an entity.
Is it possible to list the properties of all Complex Types in every entity in a diagram – like the view in Property Editor -> Mapping?
All entities in a diagram should view all properties/columns because only DBA knows the properties of Complex Types.

Is it possible to use a Complex Type as inheritance – like:
public class Person : InsertDataBase ?
I wouldn’t define separate tables. I’d like to define properties once and include them in every entity – so I have the same definition/attributes in every entity.

Is it possible to customize a different class path to all “normal” entities and Complex Types and …?

Is it possible to define different templates for entities e.g. to specify different using directives? If I can set the template for every entity I also can decide which path will be used.

Next questions will be come and so I will come back soon. :)
Thanks.



It seems to cause difficult problems…?

Amendment & background:
I’m a DBA and also a newbie in Visual Studio and C#. For this I didn’t find the correct terms :)
The requirement for our developers in Visual Studio is the “Code first” approach. Therefore, the idea arose that the DBA provides the classes. I came across the Entity Developer looking for a graphical interface.
The programmers like to have POCO classes – for this I mean that all properties are on the same "Level" in an entity like: Person.<fieldname> and not in a separate instance like: Person.InsertDataBase.<fieldname>.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: NewBie (add amendment & background)

Post by Shalex » Wed 15 Aug 2018 18:14

Specify the ORM framework you are working with. Let's say this is Entity Framework 6 with enabled DbContext template.
wti wrote: Thu 09 Aug 2018 11:11First I’m not able to work with Entity Developer as a plugin of Visual Studio 2015. I’ve no option to create a new Diagram/Model. Is it necessary to select a special kind of project type?
Our project has already been created by the programming and I have taken over the structure and all existing files/setting via git.
Please refer to https://www.devart.com/entitydeveloper/download.html > "HTML Help documentation" (download, right click > Properties > Unblock), navigate to ORM Support > Entity Framework > Creating Models > Creating Model Using Database-First Approach.
Notes:
* select "Entity Framework 6" on the 12th step
* remove EntityObject and add DbContext template via 17th, 18th, 19th steps
wti wrote: Thu 09 Aug 2018 11:11I create Complex Types with a list of columns/properties and other Complex Types and insert them in an entity.
Is it possible to list the properties of all Complex Types in every entity in a diagram – like the view in Property Editor -> Mapping?
All entities in a diagram should view all properties/columns because only DBA knows the properties of Complex Types.
Diagram should represent only model classes (instead of database tables). That is a purpose of a complex type not to show its members in every entity but only its name. A current behavior is correct.
wti wrote: Thu 09 Aug 2018 11:11Is it possible to use a Complex Type as inheritance – like:
public class Person : InsertDataBase ?
I wouldn’t define separate tables. I’d like to define properties once and include them in every entity – so I have the same definition/attributes in every entity.
Complex type cannot be inherited.
There are two ways to use common properties:
1. Via Model Settings (double click the diagram surface) > Model > General > Initialization.
2. Create an abstract base class with a set of common properties. And initialize the BaseType property of every model class with the name of this base class.
wti wrote: Thu 09 Aug 2018 11:11Is it possible to customize a different class path to all “normal” entities and Complex Types and …?
By default, File Per Class=True in the properties of DbContext template. In this case complex types (as well as classes) are generated in separate files on the path defined in Entities Output (DbContext template's property).
wti wrote: Thu 09 Aug 2018 11:11Is it possible to define different templates for entities e.g. to specify different using directives? If I can set the template for every entity I also can decide which path will be used.
You can do that this way. Create a new Class Extended Property (via Model Settings), then modify a predefined template to read a path to a destination folder defined in Class Extended Property and use it for code generation.

wti
Posts: 2
Joined: Thu 09 Aug 2018 08:27

Re: NewBie (add amendment & background)

Post by wti » Thu 16 Aug 2018 10:31

wrote: Please refer to https://www.devart.com/entitydeveloper/download.html > "HTML Help documentation" (download, right click > Properties > Unblock), navigate to ORM Support > Entity Framework > Creating Models > Creating Model Using Database-First Approach.
Notes:
* select "Entity Framework 6" on the 12th step
* remove EntityObject and add DbContext template via 17th, 18th, 19th steps
The reason for having no templates is to access them online. We have a very high security Level and Internet access is possible only via Citrix Server. It isn't possible to have access to Internet from any application.

Did you have an offline version of your templates (with Installation description?

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: NewBie (add amendment & background)

Post by Shalex » Fri 17 Aug 2018 11:11

The DbContext, EntityObject and other templates are created on your workstation by the Entity Developer installation.

Post Reply