Export (0) Print
Expand All

IEntityDesignerExtendedProperty.CreateProperty Method

[This page is specific to the Entity Framework version 6. The latest version is available as the 'Entity Framework' NuGet package. For more information about Entity Framework, see msdn.com/data/ef.]

Creates a new property for an object that is selected in the Entity Data Model Designer or the Model Browser.

Namespace:  Microsoft.Data.Entity.Design.Extensibility
Assembly:  Microsoft.Data.Entity.Design.Extensibility (in Microsoft.Data.Entity.Design.Extensibility.dll)

[SuppressMessageAttribute("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Justification = "This is a desirable name")]
Object CreateProperty(
	XElement xElement,
	PropertyExtensionContext context
)

Parameters

xElement
Type: System.Xml.Linq.XElement
The element in the .edmx file that defines the object that is selected in the Entity Data Model Designer or the Model Browser
context
Type: Microsoft.Data.Entity.Design.Extensibility.PropertyExtensionContext
Provides file and project information.

Return Value

Type: System.Object
An object whose public properties are displayed in the Visual StudioProperties window. For more information, see PropertyGrid.

Called when the selected object changes in the ADO.NET Entity Designer. An implementation should return a new instance of a class whose public properties should be shown in the VS property window. An implementation may return "null" to not show the property. Any exceptions thrown by an implementation of CreateProperty() are shown to the user in a standard dialog box. Extensions are responsible for localizing exception messages.

Show:
© 2015 Microsoft