Possible Duplicate:
Retrieve an object from entityframework without ONE field
I am working on asp.net mvc. currently i am using EF 4.1 code first model. Here i have list of records(43). My class is like,
public class MyTable
{
public string field1{get; set;}
public string field2{get; set;}
.
.
.
public string field20{get; set;}
}
and i am returning them as a list like List. But i dont want the field20 to return. so how could i skip particular field in my list. I have used like,
(from m in context.MyTable select new{m.field1,m.field2,...,m.field19}).ToList();
Its working very fine. but i want same result using lambda expression syntax like
context.MyTable.Skip() or any etc.
How to return only particular fields to list.