-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Description
Hi
I am developing one application using dapper dot net, need to get collection of objects where columns are configurable, when i tried ienumerable dynamic list, i am getting list of Key Value Pair of records
But i need list of records with columns (as we get in strong type ienumerable collection)
I tried below code:
IEnumerable tickets = null;
using (var dbcon = new DBContext())
{
tickets = dbcon.Connection.Query(" Select top 100 Ticket_ID,Ticket_No,Status,Reg_Time from IM_TicketMaster where sup_Function=@instance", new { Instance = new DbString { Value = "IT" } });
}
the result is IEnumerable collection of DapperRow, when i convert this collection to json, it gives me a collection of key value pair, how do i convert this dynamic list to strong type collection.
Is there any proper way to get List of dynamic json objects instead of key value collection?