Share via


SchemaCompareScriptService.GenerateObjectDefinition Method

Returns a script fragment object for display in the Object Definition window of Visual Studio Premium and Visual Studio Ultimate that would either create or drop the given element from the database.

Namespace:  Microsoft.Data.Schema.Tools.Compare.Schema
Assembly:  Microsoft.Data.Schema.Tools (in Microsoft.Data.Schema.Tools.dll)

Syntax

'Declaration
Public Overridable Function GenerateObjectDefinition ( _
    modelElement As IModelElement, _
    create As Boolean _
) As IScriptFragment
public virtual IScriptFragment GenerateObjectDefinition(
    IModelElement modelElement,
    bool create
)
public:
virtual IScriptFragment^ GenerateObjectDefinition(
    IModelElement^ modelElement, 
    bool create
)
abstract GenerateObjectDefinition : 
        modelElement:IModelElement * 
        create:bool -> IScriptFragment 
override GenerateObjectDefinition : 
        modelElement:IModelElement * 
        create:bool -> IScriptFragment 
public function GenerateObjectDefinition(
    modelElement : IModelElement, 
    create : boolean
) : IScriptFragment

Parameters

  • create
    Type: System.Boolean
    true returns a "CREATE" script; false returns a "DROP" script.

Return Value

Type: Microsoft.Data.Schema.ScriptDom.IScriptFragment
A script fragment that either creates or drops the modelElement from the database.

Remarks

Notes to Inheritors

You can perform one of these three options with the GenerateObjectDefinition method:

  • Not override this method and thereby accept the default functionality.

  • Override this method, call the base method, and modify the output, if required by the database schema model.

  • Override this method and provide your own script fragment generation functionality.

.NET Framework Security

See Also

Reference

SchemaCompareScriptService Class

Microsoft.Data.Schema.Tools.Compare.Schema Namespace

IModelElement

IScriptFragment