EdmFunctionAttribute(String, String) Construtor

Definição

Inicializa uma nova instância da classe EdmFunctionAttribute.Initializes a new instance of the EdmFunctionAttribute class.

public:
 EdmFunctionAttribute(System::String ^ namespaceName, System::String ^ functionName);
public EdmFunctionAttribute (string namespaceName, string functionName);
new System.Data.Objects.DataClasses.EdmFunctionAttribute : string * string -> System.Data.Objects.DataClasses.EdmFunctionAttribute
Public Sub New (namespaceName As String, functionName As String)

Parâmetros

namespaceName
String

O namespace da função mapeada.The namespace of the mapped-to function.

functionName
String

O nome da função mapeada.The name of the mapped-to function.

Comentários

Um EdmFunctionAttribute vincula um método Common Language Runtime (CLR) a outra função.An EdmFunctionAttribute links a common language runtime (CLR) method to another function. Por exemplo, o atributo pode ser usado para mapear um método CLR para uma função que é exposta pelo provedor de armazenamento, para uma função definida pelo usuário no banco de dados ou para uma função definida pelo usuário no modelo conceitual.For example, the attribute can be used to map a CLR method to a function that is exposed by the storage provider, to a user-defined function in the database, or to a user-defined function in the conceptual model. Os métodos que têm esse atributo podem ser chamados de consultas LINQ to Entities.Methods that have this attribute can be called from LINQ to Entities queries.

Para usar um EdmFunctionAttribute para mapear um método CLR para uma função, o seguinte deve ser verdadeiro:To use an EdmFunctionAttribute to map a CLR method to a function, the following must be true:

  • O tipo de retorno do método CLR deve ser compatível com o tipo de retorno da função mapeado para.The return type of the CLR method must be compatible with the return type of the mapped-to function.

  • Os tipos de argumento do método CLR devem ser compatíveis com os tipos de argumento da função mapeado para.The argument types of the CLR method must be compatible with the argument types of the mapped-to function.

Para obter informações sobre tipos compatíveis, consulte CSDL (tipos de modelo conceitual).For information about compatible types, see Conceptual Model Types (CSDL).

Aplica-se a