Hi there,
I'am using Entity Developer 5.0.66.0 and VS2012.
I try to make an DbContext Model with Entity Framework 5 support and the copy template option in the Wizard. So far so good. My data classes and DbContext Classes have been created.
But if i change the template (implement INotifyPropertyChanged) nothing happend.
The Template is written to disk, but the data classes always created with the old Templates.. (seems to be some kind of caching Feature )
I try to change the edml and run custom tool, but as before the old template generate the classes.
Only if restart VS2012 the new Template takes over the Code Generation.
Please Help, thanks
edit: Ok, closing the edml and opening again seems to have the same effect as vs restart.
DbContext Template Change only recognized after vs2012 restart
-
- Posts: 18
- Joined: Mon 25 Mar 2013 10:29
Re: DbContext Template Change only recognized after vs2012 restart
The code is regenerated only if the model is changed. If you modify template but model is without changes, nothing happens by design. So edit template and save it, then modify your model (e.g. move any entity on a diagram) and save it as well (or press the Save All button). Now check the generated code.Jan Zimmermann wrote:But if i change the template (implement INotifyPropertyChanged) nothing happend.
Does it help?
Re: DbContext Template Change only recognized after vs2012 restart
Supplement to my previous answer:
if template is opened via Tools > Entity Developer > Model Explorer (*.edml model should be opened and active in this case), saving its changes will mark the model as modified (the asterisk after the name on the tab). Save the model to regenerate the code.
if template is opened via Tools > Entity Developer > Model Explorer (*.edml model should be opened and active in this case), saving its changes will mark the model as modified (the asterisk after the name on the tab). Save the model to regenerate the code.