The solution is to attach a text template (TT) to your EDMX file. This will allow you to add features and change the entities common behavior allowing you to write less redundant code in your partial classes implementation.
Add the text template
Follow these steps to add code generation item :- Open your EDMX designer
- Right click in the designer and select Add code generation item.
- Select ADO.NET EntityObject Generator
- Click ok
You will see the TT file appears and a corresponding .cs generated file. Now it is possible to add a base class and additional features to your entities.
No comments:
Post a Comment