Most of the samples showing how to use the .NET Backend have a single type that represents both the data stored in the database and the data that is exposed to the service callers. However, sometimes you cannot expose your database data as-is, or you want to provide and accept extra data to callers that should not be in the database.
The .NET backend is strongly-typed, so in those situations, you must map your data between the database type and the client type. For example:
- You have extra information in your database table that you do not want to expose publicly, such as a Salary field.
- You have an existing database table that you want to expose through Mobile Services, but the table’s shape in “wrong” in some way (the Id property is not a string, missing some of the members needed byITableData, etc.)
- You want the expose the information from a database columns in a different way, such as expose a start date as a string (like “May 2013”) instead of as a DateTimeOffset object.
To read more about this, click here: