Self traking template, how to use

Discussion of open issues, suggestions and bugs regarding Entity Framework support in ADO.NET Data providers
Post Reply
[email protected]
Posts: 13
Joined: Sun 15 Aug 2010 11:08

Self traking template, how to use

Post by [email protected] » Sun 15 Aug 2010 11:15

plz i want to know how to use self tracking template with entity developer.
i know there are many topic about this manner but i miss the final touch
if you can help me with step by step approach it will be great from you.
Thanks

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Mon 16 Aug 2010 08:25

Take a look at this article.
To make these templates work with the Devart Entity model, (.edml files) follow the steps described in our blog here.
There is one more thing - don't forget to change the "$edmxInputFile$" to the name of your model.

[email protected]
Posts: 13
Joined: Sun 15 Aug 2010 11:08

Plz i stop in some point

Post by [email protected] » Mon 16 Aug 2010 11:26

You can say stupid about me, or you can say less clever but really i can't make it. i get in some point and stop: how i attach the template to designer and which file specifically. really if you can make it in short video you will make a very great favor for my.
Thank you a lot for your help

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Mon 16 Aug 2010 13:53

Here are the steps I was using:
1. Add a Devart Entity model to your project (it is named DataModel1 by default). Adjust the connection, select some tables in Database Explorer and drop them on the designer surface.
As an alternative, you can run Create Model from Database wizard, it will create a model for you.
Go to the Properties window of the model file and clear out the Custom Tool property.
2. Add an ADO.NET Self-Tracking Entity Generator to your project. Name it DataModel1.tt for simplicity. this will create two code generation templates - DataModel1.tt and DataModel1.Context.tt.
3. Open both these templates and replace "$edmxInputFile$" with "DataModel1.edml".
4. Save the project. You will obtain a couple of code files generated by the DataModel1.Context.tt - DataModel1.Context.cs and DataModel1.Context.Extensions.cs; Datamodel1.cs file, and as many files as you have entities in the model in form of .cs generated by the DataModel1.tt template.

Please note that I assume the steps described in this post are already performed.

Hope these steps will help.

[email protected]
Posts: 13
Joined: Sun 15 Aug 2010 11:08

Thank you very much

Post by [email protected] » Mon 16 Aug 2010 17:40

Really you are wonderful, it Done
thank you very very much

Post Reply