Reputation: 29
How can I pass stored procedure name dynamically to Linq-to-SQL, vb.net and get the result into a datatable.
Thanks in advance.
Upvotes: 1
Views: 261
Reputation: 13467
you can either use ExecuteQuery<T>(string Your Query)
.First build your string and then execute it and return T result and then iterate it to DataTable.
Upvotes: 0
Reputation: 887857
LINQ to SQL is all about compile-time type-safety and avoiding DataTables.
You should use classic ADO.Net, using a SqlDataAdapter
.
Upvotes: 4