Skip to content
| Marketplace
Sign in
Visual Studio>Templates>ADO.NET C# DbContext Generator With WCF Support
ADO.NET C# DbContext Generator With WCF Support

ADO.NET C# DbContext Generator With WCF Support

Amir Liberman

|
22,646 installs
| (7) | Free
A project item to generate a strongly-typed DbContext class and persistence ignorant entity classes with addtional Data Contact related attributes to support WCF.
Download

New template for EF 5.x is now available.

New Template and EDM extender are now available. Click here for details. 

This Generator is a T4 template that can be used to generate a strongly-typed DbContext class and persistence ignorant entity classes with support for WCF in a C# project. Once installed, you can right-click on the EDM Designer surface and select "Add Code Generation Item..." from the menu.

This Template generates code identical to the standard ADO.NET DbContext Template with the addition of attributes needed by WCF:

Per Class:
    [DataContract(IsReference = true)]
    [KnownType(typeof(...))]
Per Property:
[DataMember]

Revisions:

1.1 Added new constructors that help with controlling the creation of proxies and expose the
underlying context
1.2 Corrected Data Contract attribute for complex types

 

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft