ASP.NET Core MVC Controls | ComponentOne
C1.Web.Mvc Namespace / CollectionViewHelper Class / Read<T> Method
The type of data record
The request data
The source collection
The function to get the items source for the specified column's data map.






In This Topic
    Read<T> Method
    In This Topic
    Reads data from the request and the source collection.
    Syntax
    'Declaration
     
    
    Public Shared Function Read(Of T)( _
       ByVal requestData As CollectionViewRequest(Of T), _
       ByVal sourceCollection As System.Collections.Generic.IEnumerable(Of T), _
       Optional ByVal dataMapItemsSourceGetter As System.Func(Of ColumnInfo,IEnumerable(Of Object)) _
    ) As CollectionViewResponse(Of T)
    'Usage
     
    
    Dim requestData As CollectionViewRequest(Of T)
    Dim sourceCollection As System.Collections.Generic.IEnumerable(Of T)
    Dim dataMapItemsSourceGetter As System.Func(Of ColumnInfo,IEnumerable(Of Object))
    Dim value As CollectionViewResponse(Of T)
     
    value = CollectionViewHelper.Read(Of T)(requestData, sourceCollection, dataMapItemsSourceGetter)
    public static CollectionViewResponse<T> Read<T>( 
       CollectionViewRequest<T> requestData,
       System.Collections.Generic.IEnumerable<T> sourceCollection,
       System.Func<ColumnInfo,IEnumerable<object>> dataMapItemsSourceGetter
    )
    public function Read( 
        requestData: CollectionViewRequest;
        sourceCollection: System.Collections.Generic.IEnumerable;
        dataMapItemsSourceGetter: System.Func
    ): CollectionViewResponse; static; 
    public static function Read( 
       requestData : CollectionViewRequest,
       sourceCollection : System.Collections.Generic.IEnumerable,
       dataMapItemsSourceGetter : System.Func
    ) : CollectionViewResponse;
    public: static CollectionViewResponse<T*>* Read<T>( 
       CollectionViewRequest<T*>* requestData,
       System.Collections.Generic.IEnumerable<T*>* sourceCollection,
       System.Func<ColumnInfo*,IEnumerable<Object*>*>* dataMapItemsSourceGetter
    ) 
    public:
    static CollectionViewResponse<T^>^ Readgeneric<typename T>
    ( 
       CollectionViewRequest<T^>^ requestData,
       System.Collections.Generic.IEnumerable<T^>^ sourceCollection,
       System.Func<ColumnInfo^,IEnumerable<Object^>^>^ dataMapItemsSourceGetter
    ) 

    Parameters

    requestData
    The request data
    sourceCollection
    The source collection
    dataMapItemsSourceGetter
    The function to get the items source for the specified column's data map.

    Type Parameters

    T
    The type of data record

    Return Value

    The response data
    See Also