Skip to content

Commit

Permalink
Added Readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
zaitsman authored Oct 8, 2016
1 parent 66023fa commit 7cd943c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Automapper OData $expand example
A short project demonstrating how one could use Automapper with $expand and have the result collection include $inlinecount and nextpagequery links.

# Idea
Automapper includes great support for OData in that you can just do an [EnableQuery] and then ProjectTo<> inside your controller code, and $order, $top, $skip, $select and $filter work out of the box.

What was missing is the next page link (think HATEOAS), total count and the ability to skip expanding the navigational properties.
By default, Automapper supports .ExplicitExpansion() in the Map, so all we needed to do was add translation from OData $expand to the relevant call of ProjectTo<>.

0 comments on commit 7cd943c

Please sign in to comment.