WCF learning-build the second WCF application (4) and the second wcf
I. WCF server application
1. Create a WCF server application project
Open Visual Studio 2013, and choose File> New> Project> WCF Service application from the menu. Enter "WcfService" in the text box corresponding to "name" in the pop-up interface, and then click "OK. For example.
2. Install Entity Framework
1) Use NuGet to download the latest Entity Framework 6.1.3. In Solution Explorer, right-click the WcfService project and choose manage NuGet packages from the shortcut menu to open the NuGet package management interface. For example.
2) Search for Entity in the NuGet package management interface, find the latest Entity Framework, and click Download and install. For example. (I have installed it successfully)
3. Create an Object Data Model
1. on the menu bar, select "project" and "Add new project ".
2. In the "Add new project" dialog box, select the "data" node and select the "ADO. NET Object Data Model" item.
3. In the "name" text box, enter BookModel and select the "add" button. For example.
4. In the Object Data Model Wizard, on the select model content page, select "generate from database", and then select the next button. For example.
5. Click "New Connection", select "Microsoft SQL Server", and click "continue ".
6. In the "Connection Properties" dialog box, select the corresponding database server, enter the user name and password, and select the database to be used. For example. (You can also log on to Windows)
7. Click "OK" to generate the page, as shown in. Click "Next ".
8. Select database objects and settings
9. Final Result