Hi
In below code i want to list only 2 columns
public List<View_Header> GetListMobile() { List<View_Header> Result = (from t in context.View_Headers where t.IsActive == true select t).ToList(); return Result; }
Thanks
Resolved with below code.
public List<View_Header> GetList() { List<View_Header> Result = (from t in context.View_Headers where t.IsActive == true select new View_Header { ID = t.ID, Name = t.Name }).ToList(); return Result; }
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.