Quantcast
Channel: EntityFramework Reverse POCO Code First Generator
Viewing all articles
Browse latest Browse all 1642

Commented Unassigned: Filtering of "Navigation Properties" [157]

$
0
0
When building objects and thinking about DDD and aggregate boundaries, one often might choose to deliberately NOT have a full-on navigation property between aggregates, and only keep the ID of the related entity. It would be good to be able to filter the list of relationships that are generated using some sort of predicate filter.

I spoke with Simon who suggested that I could customise the EF.Reverse.POCO.Core.ttinclude file, searching for:

```
var fkList = reader.ReadForeignKeys(TableRename);
```
and filtering the values.

This is a suitable workaround, although obviously it would be preferable if the core ttinclude file simply referenced a `Func<ForeignKey>` defined somewhere in my .tt files. :)
Comments: I was helping Julie Lerman yesterday with this too. I will definitely make this an option in the tt settings file.

Viewing all articles
Browse latest Browse all 1642

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>