Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Although managing local data is important for many applications, that data typically comes from an external service, such as a web service. In some scenarios, your application will be able to take the results from the service and use them directly; however, in other scenarios, it will be necessary to use a subset of the data returned from the service.
For the examples in this section, the data is returned from a fictitious web server, which returns a list of ServerFavoriteLocation instances, which need to be converted into a FavoriteLocation instance. To do this, you add the following static method to the code in Listing 16.10:
public static FavoriteLocation Convert(ServerFavoriteLocation local)
{
var newLocation = new FavoriteLocation();
// Copy all the columns we care about
return newLocation;
}