Retrieving data from 1:n relationship using .NET backend Azure Mobile Services!!!!!!!

Posted on

The .NET backend for Azure Mobile Services makes it easy to expose related tables via Entity Framework. However, related entities are not returned by default – for example, if you retrieve the list of orders from your orderController, it will not return the order items unless you explicitly ask for it. The way to request related entities is done via the OData $expand query operator

In this article I will walk through a sample showing how to retrieve related entities from client and service

  1. Setup data models with 1:n relationship on the service
  2. Update data models on the client to match new data models on the service
  3. Example on how to add expand handler on the client to query for related entities
  4. Example on how to update service to use ActionFilterAttribute to include related entities

To read more about this, click here:


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s