The EDM Designer only collects the information it needs for Entity Framework's native code generator. DevForce needs more information in order to generate its own entity classes. The DevForce EDM Designer extension adds features to the base EDM Designer that help the developer provide that extra information.
From the Visual Studio menu pick Tools | Extension Manager ... and scroll through the Extension Manager dialog until you see:
The DevForce EDM Designer extension (or DevForce 2010 EDM Designer Extension for .NET 4.0 in Visual Studio 2012) was installed with DevForce.
If you don't see this extension, there are several possible reasons:
The extension changes the EDM Designer in two ways:
Annotations are the approved way to extend the CSDL according to the specification.
"Annotations allow applications to embed application-specific or vendor-specific information into CSDL. The format does not specify how to process these custom-defined structures or how to distinguish structures from multiple vendors or layers. Parsers of the CSDL MAY ignore Annotations that are not expected or not understood."
This screenshot shows the EDM Designer displaying information about an entity property.
The CompanyName property of the Customer entity has been selected in the diagram on the left. The Properties window on the right displays the EDM object definition properties of that CompanyName property, sorted by category.
In the middle of the Properties window is a new category, outlined in yellow, labeled “DevForce Code Generation”. This category was added by the DevForce EDM Extension. The properties in this category govern code generation of the CompanyName property.
The “Display Name” property is outlined in red with a value of “Company Name”. The developer is telling DevForce to add a .NET DisplayAttribute to the Customer’s CompanyName property when it generates the entity class code.
The DevForce EDM Extension writes this advice as an annotation to the CSDL section in the EDMX file. The CSDL definition of the CompanyName property looks like this:
XML | <Property Name="CompanyName" Type="String" Nullable="false" MaxLength="40" Unicode="true" FixedLength="false" ib10:DisplayName="Company Name" /> |
The attribute ib10:DisplayName is the DevForce annotation. After code generation the property looks like something like this:
C# | [Display(Name="Company Name", AutoGenerateField=true)] public string CompanyName {...} |
VB | <Display(Name:="Company Name", AutoGenerateField:=True)> Public ReadOnly Property CompanyName() As String ... End Property |
DevForce Code Generation sections adorn every level of the CSDL specification. At the top level are properties to control code generation for the model as a whole:
There are two ways to enable or disable DevForce code generation for the entity models.
On a per-EDMX basis
You can switch between the DevForce code generator and the Entity Framework default generator for a specific entity model by setting the "DevForce Enabled" field on the EDMX property sheet:
Globally for all of Visual Studio
You can enable or disable the DevForce extension itself from within the Visual Studio Extension Manager. Disabling the extension both removes the DevForce properties from the designer and disables DevForce code generation.