property remove from the list

If you want to “remove” the property you will have create new type without this property:

oList = db.Categories.Select(p => new YourNewCategorySml { 
  CategoryName = p.CategoryName })
  .ToList();  

or use the anonymous type:

oList = db.Categories.Select(p => new { CategoryName = p.CategoryName })
  .ToList();  

Leave a Comment