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)
Syntax
'Declaration
<SuppressMessageAttribute("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Justification := "This is a desirable name")> _
Function CreateProperty ( _
xElement As XElement, _
context As PropertyExtensionContext _
) As Object
'Usage
Dim instance As IEntityDesignerExtendedProperty
Dim xElement As XElement
Dim context As PropertyExtensionContext
Dim returnValue As Object
returnValue = instance.CreateProperty(xElement, _
context)
[SuppressMessageAttribute("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Justification = "This is a desirable name")]
Object CreateProperty(
XElement xElement,
PropertyExtensionContext context
)
[SuppressMessageAttribute(L"Microsoft.Naming", L"CA1704:IdentifiersShouldBeSpelledCorrectly", Justification = L"This is a desirable name")]
Object^ CreateProperty(
XElement^ xElement,
PropertyExtensionContext^ context
)
[<SuppressMessageAttribute("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Justification = "This is a desirable name")>]
abstract CreateProperty :
xElement:XElement *
context:PropertyExtensionContext -> Object
function CreateProperty(
xElement : XElement,
context : PropertyExtensionContext
) : Object
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.
Remarks
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.