Hii,
Which approach is better,
//List Of Entity Framework Objects
List<Product> result = (from itm in _Ctx.Products
select itm).ToList();
return result
/*-----OR----*/
//List of Custom Class Obects
List<ProdList> result = from itm in _Ctx.Products
select new ProdList
{
ID = itm.Id,
ProdName= itm.ProdName
};
return result.ToList();
Which approach is better from the performance point of view?
One more thing, if ProductName is null it gives error in the custom class case. How to handel it?
...
Go to the complete details ...