I have the following class:
public class Movie
{
public int MovieId { get; set; }
public string Title { get; set; }
}
I want to create a lambda expression like this, which contained all properties of the class:
m => new { m.MovieId, m.Title }
Is it possible to generate that dynamically? Thanks