Quantcast
Channel: Web Forms
Viewing all articles
Browse latest Browse all 23244

Convert to DataTable

$
0
0

Hi,

I am using Linq to SQL.I had dragged and dropped a stored procedure .

In interface i have

IList<SP_Role>GetDetails(string strid)

also i am using Repository to read datas i.e _port is repository.From repositor i call interface.

_port.GetDetails(strid)

I want to convert this to datatable

Datatable dt=null;

dt=(Datatable)_port.GetDetails(strid)

It shows error

Unable to cast object of type 'System.Collections.Generic.List`1[RRPortal.Data_Access_Layer.SP_Validate_ITISAssociatesResult]' to type 'System.Data.DataTable'.

 

please help


Viewing all articles
Browse latest Browse all 23244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>