In EF CodeFirst Fluent API I can write something like this:
modelBuilder.Entity<MyEntity>()
.Ignore(e => e.Property1);
modelBuilder.Entity<MyEntity>()
.Ignore(e => e.Property2);
How to ignore all properites but a tiny set, like this:
modelBuilder.Entity<MyEntity>()
.IgnoreAllBut(e => e.ID, e => e.Important);
Is it possible to write extension method like this IgnoreAllBut?
This is draft, but works:
Thanks to DarkGray for code in linked question.