Hi Manas,
You can try this code
var TemplateEntityList = objrestlistinfo.RESTInfoResponseList.Select(x => x.TemplateEntityList).Distinct();
List<template> lstTemplateEntity = new List<template>();
int indx = 0;
foreach (var templatesetset in TemplateEntityList.ToList())
{
Template obj = new Template();
obj.TemplateID = templatesetset[indx].TemplateID;
obj.TemplateName = templatesetset[indx].TemplateName;
lstTemplateEntity.Add(obj);
indx++;
}
I think you are trying to move first element alone to the object, so I added index value to get respective data from the table and move to obj.
Hope this helps you a bit.
Regards,
RK