WCF learning-build the second WCF application (4) and the second wcf

Source: Internet
Author: User

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

  

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.