Creating a model

Although we could reuse the .NET Standard 2.0 entity data model library that you created earlier, we want to implement two-way data binding, so we will create a new class to represent customer entities in the mobile app.

Right-click on the project named NorthwindMobile, go to Add | New Folder, and name it Models.

Right-click on the Models folder and go to Add | New File....

In the New File dialog, go to General | Empty Class, enter the name Customer, as shown in the following screenshot, and click on New:

Modify the statements, as shown in the following code:

using System.Collections.Generic; using System.Collections.ObjectModel; ...

Get C# 7.1 and .NET Core 2.0 – Modern Cross-Platform Development - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.