Quantcast
Channel: Entity Framework
Viewing all articles
Browse latest Browse all 10318

Commented Feature: Consider adding Ignore method directly on lightweight property configurations [1347]

$
0
0
This is based on customer feedback located [here](http://blogs.msdn.com/b/adonet/archive/2013/05/30/ef6-beta-1-available.aspx?wa=wsignin1.0#10430343).

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: in code-first model this will be very useful pattern, and more understandable.

Viewing all articles
Browse latest Browse all 10318

Trending Articles