IEntityDesignerExtendedProperty.CreateProperty Method (XElement, PropertyExtensionContext)

 

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

[SuppressMessageAttribute("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", 
    Justification = "This is a desirable name")]
object CreateProperty(
    XElement xElement,
    PropertyExtensionContext context
)
[SuppressMessageAttribute("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", 
    Justification = "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
<SuppressMessageAttribute("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly",
    Justification := "This is a desirable name")>
Function CreateProperty (
    xElement As XElement,
    context As PropertyExtensionContext
) As 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

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.

See Also

IEntityDesignerExtendedProperty Interface
Microsoft.Data.Entity.Design.Extensibility Namespace

Return to top