Skip to content
| Marketplace
Sign in
Visual Studio>Templates>EF 5.x DbContext Generator with WCF Support
EF 5.x DbContext Generator with WCF Support

EF 5.x DbContext Generator with WCF Support

Amir Liberman

|
5,137 installs
| (1) | 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

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]

Special thanks to Nick Colman for jump starting this template!
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft