IMultipleResults Arabirim
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Değişken dönüş sıralarına sahip eşlenmiş işlevlerin veya sorguların sonuçlarını temsil eder.
public interface class IMultipleResults : IDisposable, System::Data::Linq::IFunctionResult
public interface IMultipleResults : IDisposable, System.Data.Linq.IFunctionResult
type IMultipleResults = interface
interface IFunctionResult
interface IDisposable
Public Interface IMultipleResults
Implements IDisposable, IFunctionResult
- Uygulamalar
Örnekler
CREATE PROCEDURE VariableResultShapes(@shape int)
AS
if(@shape = 1)
select CustomerID, ContactTitle, CompanyName from customers
else if(@shape = 2)
select OrderID, ShipName from orders
[Function(Name="dbo.VariableResultShapes")]
[ResultType(typeof(VariableResultShapesResult1))]
[ResultType(typeof(VariableResultShapesResult2))]
public IMultipleResults VariableResultShapes([Parameter(DbType="Int")] System.Nullable<int> shape)
{
IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), shape);
return ((IMultipleResults)(result.ReturnValue));
}
<FunctionAttribute(Name:="dbo.VariableResultShapes"), _
ResultType(GetType(VariableResultShapesResult1)), _
ResultType(GetType(VariableResultShapesResult2))> _
Public Function VariableResultShapes(<Parameter(DbType:="Int")> ByVal shape As System.Nullable(Of Integer)) As IMultipleResults
Dim result As IExecuteResult = Me.ExecuteMethodCall(Me, CType(MethodInfo.GetCurrentMethod, MethodInfo), shape)
Return CType(result.ReturnValue, IMultipleResults)
End Function
Açıklamalar
Aşağıdaki SQL kodu örneğinde sonuç şekli girişe (shape =1 veya shape = 2) bağlıdır. Projeksiyonların döndürülme sırası tanımlanmamıştır.
Özellikler
| Name | Description |
|---|---|
| ReturnValue |
İşlevin dönüş değerini alır. (Devralındığı yer: IFunctionResult) |
Yöntemler
| Name | Description |
|---|---|
| Dispose() |
Yönetilmeyen kaynakları serbest bırakma, serbest bırakma veya sıfırlama ile ilişkili uygulama tanımlı görevleri gerçekleştirir. (Devralındığı yer: IDisposable) |
| GetResult<TElement>() |
Bir sonraki sonucu belirtilen türde bir dizi olarak alır. |