is this is proper use of IEnumerable or shell i use list?
what i need to put in <PropertyInfo>
?
public static IEnumerable<PropertyInfo> GetNewsList<T>(int FID)
{
CatomWebNetDataContext pg = (CatomWebNetDataContext)db.GetDb();
return (from nls in pg.NewsCat_ITEMs
join vi in pg.VIRTUAL_ITEMs on nls.NC_VI_ID equals vi.VI_ID
where vi.VI_VF_ID == FID
select new { nls, vi });
}
or
public List<PropertyInfo> GetPublic<T>(int FID)
{
CatomWebNetDataContext pg = (CatomWebNetDataContext)db.GetDb();
var nl = (from nls in pg.NewsCat_ITEMs
join vi in pg.VIRTUAL_ITEMs on nls.NC_VI_ID equals vi.VI_ID
where vi.VI_VF_ID == FID
select new { nls, vi });
List<PropertyInfo> retList = new List<PropertyInfo>();
foreach (var item in nl)
{
retList.Add(item);
}
return retList;
}