Generate Code No Response

Discussion of open issues, suggestions and bugs regarding Entity Framework support in ADO.NET Data providers
Post Reply
daview
Posts: 8
Joined: Thu 06 Nov 2014 01:45

Generate Code No Response

Post by daview » Thu 06 Nov 2014 01:50

I use the trial version of EntityDeveloper, and generate code success normally, but when I design the ORM, it didn't response, I don't know why.

Would you help me? Thanks!

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

Re: Generate Code No Response

Post by MariiaI » Thu 06 Nov 2014 11:06

daview wrote:I use the trial version of EntityDeveloper, and generate code success normally, but when I design the ORM, it didn't response, I don't know why.
The code is automatically regenerated when the model is saved.
If it is not the case, please specify the issue you have encountered in more details:
- the ORM framework you are working with - EF, NHibernate, LINQ to SQL;
- what do you mean about "when I design the ORM, it didn't response", e.g. the steps you are performing, etc;
- whether you are getting any errors, warnings;
- the template you are using for code generation.

daview
Posts: 8
Joined: Thu 06 Nov 2014 01:45

Re: Generate Code No Response

Post by daview » Tue 11 Nov 2014 04:06

MariiaI wrote:
daview wrote:I use the trial version of EntityDeveloper, and generate code success normally, but when I design the ORM, it didn't response, I don't know why.
The code is automatically regenerated when the model is saved.
If it is not the case, please specify the issue you have encountered in more details:
- the ORM framework you are working with - EF, NHibernate, LINQ to SQL;
- what do you mean about "when I design the ORM, it didn't response", e.g. the steps you are performing, etc;
- whether you are getting any errors, warnings;
- the template you are using for code generation.
thanks!

I use the VS 2013, it can be automatic generate code, but, have some bugs it make the vs exit.

I use the EntityDeveloper Enviroment, when I press F7 to generate code, it no any action: no errors, no any messages, no code files.

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

Re: Generate Code No Response

Post by MariiaI » Tue 11 Nov 2014 13:56

I use the EntityDeveloper Enviroment, when I press F7 to generate code, it no any action: no errors, no any messages, no code files.
You are using Entity Developer in Visual Studio 2013, aren't you? If yes, the code is generated when the changes to the model are made and the model is saved. If it is stand-alone application, you should use F7 for code generation or the Generate Code button on the toolbar (JIC: F7 doesn't apply when working in Visual Studio).
Also, make sure that one of the available templates is available for the model: expand the Templates node in Model Explorer - there should be at least one template, e.g. 'DbContext'.
I use the VS 2013, it can be automatic generate code, but, have some bugs it make the vs exit.
Please specify the bugs you have encountered in more details, e.g. the exact steps to reproduce the issue with Visual Studio, etc.

Please also look at the Entity Developer documentation, which is available with the installation package (the "Help" component should have been selected when installing).

daview
Posts: 8
Joined: Thu 06 Nov 2014 01:45

Re: Generate Code No Response

Post by daview » Thu 13 Nov 2014 13:47

MariiaI wrote:
I use the EntityDeveloper Enviroment, when I press F7 to generate code, it no any action: no errors, no any messages, no code files.
You are using Entity Developer in Visual Studio 2013, aren't you? If yes, the code is generated when the changes to the model are made and the model is saved. If it is stand-alone application, you should use F7 for code generation or the Generate Code button on the toolbar (JIC: F7 doesn't apply when working in Visual Studio).
Also, make sure that one of the available templates is available for the model: expand the Templates node in Model Explorer - there should be at least one template, e.g. 'DbContext'.
I use the VS 2013, it can be automatic generate code, but, have some bugs it make the vs exit.
Please specify the bugs you have encountered in more details, e.g. the exact steps to reproduce the issue with Visual Studio, etc.

Please also look at the Entity Developer documentation, which is available with the installation package (the "Help" component should have been selected when installing).
the problem is checked: my orm struct have some errors. but the F6 check is OK.

and have another question:
1, when it have more ORM classes, it generate code will take more time.
2, could show a dialog when generate as a message?
3, when make the TPH inherit, it always lost the config when F6 check.
4, in diagram, if it can be make diferrent text color or border color?
5, in VS enviroment, disigner has bug make the vs exit.

(sorry for my poor English)

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

Re: Generate Code No Response

Post by MariiaI » Fri 14 Nov 2014 12:49

1, when it have more ORM classes, it generate code will take more time.
Please specify, whether the code generation takes a long time to perform or the designer hangs.
Please also send us your model with which this issue is reproducible.
2, could show a dialog when generate as a message?
The dialog window with a progress bar is shown only when generating code in a standalone version of Entity Developer.
3, when make the TPH inherit, it always lost the config when F6 check.
Please send us your model and describe the steps we should perform to reproduce this issue.
4, in diagram, if it can be make diferrent text color or border color?
The color of the diagram is defined by the following setting:
- (for a separate diagram) right click on the diagram surface -> Options-> General -> Background Color
- (for all diagrams) Visual Studio > Tools > Options > Entity Developer > Diagram > General > Background Color
The color of the entity class on the diagram is defined by the following setting:
- right-click the necessary entity class and select properties;
- change the Shape Color property and save the changes.
5, in VS enviroment, disigner has bug make the vs exit.
Please specify the exact steps to reproduce the issue with Visual Studio.

We recommend you to take a look at the Entity Developer documentation, which is available in the installation package (the "Help" component should have been selected when installing).

daview
Posts: 8
Joined: Thu 06 Nov 2014 01:45

Re: Generate Code No Response

Post by daview » Mon 17 Nov 2014 08:39

2, when generate code, no any notify, sometimes, I think it was some wrong occured.
3, I will send the model to you.
4, I want to use the different color to markup the shapes in different diagram, but the color is limited(can be directly recognize by eyes), so, if it canbe use the shape color and the shape border color, will be best.
5, sometimes, when I design the model, the VS auto shutdown.

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

Re: Generate Code No Response

Post by MariiaI » Mon 17 Nov 2014 14:07

Thank you for the test model. Your model includes very large number of classes, enum types, complex types, associations, etc. and, in this case, we recommend you to split your model into several independent of each other ones. This significantly will speed up the process of the code generation and facilitate the work with a designer.
As for the other issues, unfortunately, the information you've provided is not enough to reproduce them and find the solutions. Please describe the exact step-by-step scenario we should perform to reproduce these issues with your model (i.e. the issue with the inheritance, etc.).

daview
Posts: 8
Joined: Thu 06 Nov 2014 01:45

Re: Generate Code No Response

Post by daview » Tue 18 Nov 2014 01:31

Thanks!

1. How to split the edm? By manual? Do you has another way to do it?

2. Pherhaps it is wrong by my computer enviroment, when I use the integrated enviroment on VS to designer, always quit suddenly. So, I always use the standlone enviroment, but, when I copy and paste the EDM to VS project, it will be auto generate code, is it can be configed?

3. I have some TPH derived classes, example MeasureInfo to MeasureWeight, MeasureCapacity, MeasureDimension, MeasureDimensions etc. When I use the command "Regenerate Storage and Mapping", the configuration of TPH will be reset.

4. When use standlone enviroment, sometimes, it will delete the association, I don't know why.

5. I want to program the T4 template, but no the Entity Developer document about the entity info.

Best Regards to you!

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

Re: Generate Code No Response

Post by MariiaI » Wed 19 Nov 2014 11:50

1. How to split the edm? By manual? Do you has another way to do it?
Yes, it should be done manually. The "Create Model Wizard" offers to select the necessary classes, which should be included to the model.
2. Pherhaps it is wrong by my computer enviroment, when I use the integrated enviroment on VS to designer, always quit suddenly.
Probably, the Visual Studio integration was not completely performed. Please specify the edition/version of your Visual Studio. Also, tell us whether you get any exception when Visual Studio quits ( if yes, please send us the full stack trace of this exception) and send us the list of Installed Products in Microsoft Visual Studio (via Help -> About Microsoft Visual Studio menu).
Try re-installing Entity Developer and tell us about the results.
3. When I use the command "Regenerate Storage and Mapping", the configuration of TPH will be reset.
We will investigate this issue and inform you about the results as soon as possible.
4. When use standlone enviroment, sometimes, it will delete the association, I don't know why.
If we correctly understand the issue you have encountered, it is related to the many-to-many associations. If yes, please uncheck the "Detect Many-To-Many associations" check box on the "Model properties" step of the Create Model Wizard. You can also uncheck the "Detect Many-To-Many associations" check box for your existing model in the Model Settings (by double-clicking the diagram layout). However, to make these changes take effect, it is necessary to recreate the model, e.g. run the "Update Model From Database" wizard with the "Recreate model" check box selected.
Please refer to the corresponding topics in the Entity Developer documentation:
- ORM Support-> Entity Framework-> Creating Models
- ORM Support-> Entity Framework-> Concepts-> Working with Associations
5. I want to program the T4 template, but no the Entity Developer document about the entity info.
Please refer to http://forums.devart.com/viewtopic.php?t=30766

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

Re: Generate Code No Response

Post by MariiaI » Mon 24 Nov 2014 06:57

3. When I use the command "Regenerate Storage and Mapping", the configuration of TPH will be reset.
We have investigated this behaviour and this is as expected. In this case there is no possibility to restore mapping after it has been deleted, due to the technical reasons. The "Regenerate Storage and Mapping" doesn't handle all situations and the dialog window, which is shown before regeneration, warn about it. This option is most suitable for the Model First approach and first initialization.
We do not recommend you to make "Regenerate Storage and Mapping" for whole your model. You can use "Create Storage and Mapping" for the necessary objects in the model and you can also turn on the automatic synchronization.

Please refer to the corresponding topics in the Entity Developer documentation:
- Basic Workflows -> Design Approaches-> Mixed Approach
- ORM Support-> Entity Framework-> Concepts-> Storage Metadata Schema -> Mapping Synchronization

Post Reply