Can someone please help me to find a way to put a variable name which will store the class name read from the database in the place of the class name "Role1" in the below code.
IEnumerable<Role1> dataresult;
dataresult = connection.Query<Role1>("sp_ReadGridData", new{ gridname ,id, usrname, LinkId }, commandType: CommandType.StoredProcedure);
return Request.CreateResponse(DataSourceLoader.Load(dataresult, loadOptions));
Thanks,
Hanusha