siva nathan

siva nathan

  • 953
  • 828
  • 233.2k

convert key value column table to DTO dynamically in c# linq

Mar 19 2021 7:04 PM
Hi All,
 
I have a key and value pair table in sql server like below,need to convert that table into DTO in linq C#
 
 
 Key value
 Name john
 Address USA
 Name Ken
 Address America
 
am having one DTO like bewlo
Public class SampleDto
{
public string Name { get;set;}
public string Address { get;set;} 
 
need to select that key,value table into List of above class columns key and value column and DTO may be add/delete
how can i achieve that 

Answers (1)