Anu

Anu

  • 1.4k
  • 301
  • 10.6k

variable name in the place of class name

Oct 14 2020 4:28 AM
Hello,
 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 
 

Answers (6)