MetaModel.GetActionPath(String, String, Object) Método
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Devolve o caminho de ação associado a uma tabela específica.
public:
System::String ^ GetActionPath(System::String ^ tableName, System::String ^ action, System::Object ^ row);
public:
virtual System::String ^ GetActionPath(System::String ^ tableName, System::String ^ action, System::Object ^ row);
public string GetActionPath(string tableName, string action, object row);
member this.GetActionPath : string * string * obj -> string
abstract member GetActionPath : string * string * obj -> string
override this.GetActionPath : string * string * obj -> string
Public Function GetActionPath (tableName As String, action As String, row As Object) As String
Parâmetros
- tableName
- String
O nome da tabela a que a ação se aplica.
- action
- String
A ação para aplicar à mesa.
- row
- Object
Um objeto que representa uma única linha de dados numa tabela.
row é usado para fornecer valores para parâmetros de sequência de consulta.
Devoluções
O URL associado à rota.
Exemplos
O exemplo seguinte mostra como usar o GetActionPath(String, String, Object) método para avaliar o caminho de encaminhamento (determinar a URL) para uma tabela especificada. Para um exemplo completo, veja MetaModel.
// Get the registered action path.
public string EvaluateActionPath()
{
string tableName = LinqDataSource1.TableName;
MetaModel model = GetModel(false);
string actionPath =
model.GetActionPath(tableName,
System.Web.DynamicData.PageAction.List, GetDataItem());
return actionPath;
}
' Get the registered action path.
Public Function EvaluateActionPath() As String
Dim tableName As String = LinqDataSource1.TableName
Dim model As MetaModel = GetModel(False)
Dim actionPath As String = model.GetActionPath(tableName, System.Web.DynamicData.PageAction.List, GetDataItem())
Return actionPath
End Function
Observações
A rota é determinada pela combinação do nome da tabela e da ação.