Let the entity class generated by ADO. NET Self-Tracking Entity Generator support the rejectchanges () method

Source: Internet
Author: User
Tags zip folder

Accompanied by. the official version of net2010 is released ,. net4.0, ef4.0, and a series of xx4.0 releases the official version. Unfortunately, ADO is in the official version of ef4.0. the entity classes generated by the net self-Tracking Entity Generator template still do not implement the built-in rejectchanges () method.

How can we make the generated object class have the rejectchanges () method? After exploration, we found a solution.

 

ADO. the files used by the net self-Tracking Entity Generator template are located in the X: \ Program Files \ Microsoft Visual Studio 10.0 \ common7 \ ide \ itemtemplatescache \ CSHARP \ code \ 1033 \ adonetentitydatamodelt4selftrackingcodegencsharp, modify

Csharpselftracking. types. tt enables the generated class to be inherited from the class that supports the rejectchanges () method.

Package related files as follows:

Http://files.cnblogs.com/wiseant/Model.Types.rar
Http://files.cnblogs.com/wiseant/AdoNetEntityDataModelT4SelfTrackingCodeGenCSharp.zip.rar

Vs2010 Simplified Chinese official version needs to overwrite the file to the X: \ Program Files \ Microsoft Visual Studio 10.0 \ common7 \ ide \ itemtemplatescache \ CSHARP \ code \ 2052 \ adonetentitydatamodelt4selftrackingcodegencsharp.zip folder, replace the original file.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.