C# Class Rock.Data.DbMetadataExtensions

from https://github.com/divega/UdfCodeFirstSample
Datei anzeigen Open project: NewSpring/Rock

Public Methods

Method Description
CreateAndAddFunction ( this item, string name, IList parameters, IList returnValues, string body = null ) : EdmFunction

Creates the and add function.

GetDefaultNamespace ( this layerModel ) : string

Obtain the namespace name from existing model defined types.

Only one namespace is allowed. Throws if there are multiple namespaces or if there aren't any types defined in the model.

GetDefaultSchema ( this layerModel ) : string

Obtains the default schema from existing entity sets in the model.

Throws if more than one schema is used or if the model contains no entity sets.

GetStorePrimitiveType ( this model, PrimitiveTypeKind typeKind ) : System.Data.Entity.Core.Metadata.Edm.EdmType

Translate a conceptual primitive type to an adequate store specific primitive type according to the provider configuration of the model.

Method Details

CreateAndAddFunction() public static method

Creates the and add function.
public static CreateAndAddFunction ( this item, string name, IList parameters, IList returnValues, string body = null ) : EdmFunction
item this The item.
name string The name.
parameters IList The parameters.
returnValues IList The return values.
body string The body.
return EdmFunction

GetDefaultNamespace() public static method

Obtain the namespace name from existing model defined types.
Only one namespace is allowed. Throws if there are multiple namespaces or if there aren't any types defined in the model.
public static GetDefaultNamespace ( this layerModel ) : string
layerModel this An EdmModel instance representing conceptual or store model.
return string

GetDefaultSchema() public static method

Obtains the default schema from existing entity sets in the model.
Throws if more than one schema is used or if the model contains no entity sets.
public static GetDefaultSchema ( this layerModel ) : string
layerModel this An instance of EdmModel representing either the conceptual or the store model.
return string

GetStorePrimitiveType() public static method

Translate a conceptual primitive type to an adequate store specific primitive type according to the provider configuration of the model.
public static GetStorePrimitiveType ( this model, PrimitiveTypeKind typeKind ) : System.Data.Entity.Core.Metadata.Edm.EdmType
model this A DbModel instance with provider information
typeKind PrimitiveTypeKind A PrimitiveTypeKind instance representing the conceptual primitive type to be translated
return System.Data.Entity.Core.Metadata.Edm.EdmType