2
Vote

Consider adding Ignore method directly on lightweight property configurations

description

This is based on customer feedback located here.

The idea is to enable doing something like this:
modelBuilder.Properties()
    .Where(p => p.GetCustomAttribute<ColumnAttribute>() == null))
    .Configure(p => p.Ignore());
Instead of having to do something like this:
modelBuilder
    .Entities()
    .Configure(conf => conf
        .ClrType
        .GetProperties()
        .Where(p => p.GetCustomAttribute<ColumnAttribute>() == null)
        .ToList()
        .ForEach(p => conf.Ignore(p)));

comments

MassoudMario wrote Jun 29, 2013 at 12:41 PM

Hi, that will be a nice feature if it will be included, specially in large, enterprise code-first models.

shrazaghi wrote Jun 30, 2013 at 8:48 AM

in code-first model this will be very useful pattern, and more understandable.

RoMiller wrote Jul 3, 2013 at 10:17 PM

EF Team Triage: We agree that this would be good to enable. Given we are closing down the EF6 release we're moving it to the Future release to re-triage after EF6.