[Web API series tutorial] 3.1-practice: process data (create a project)

Source: Internet
Author: User
Tags app service

[Web API series tutorial] 3.1-practice: process data (create a project)
Preface

This guide will teach you basic skills for creating Web applications on the backend using ASP. NET web APIs. This Guide uses Entity Framework 6 as the data layer and knockout. js as the client's JavaScript Application. This Guide also shows how to deploy an application to Azure App service Web Apps.

This Guide uses ASP. NET Web API 2 with Entity Framework 6 to create a web application that operates the backend database. This is an application you will create.

This application is designed with a single-page application (SPA. "Single-page application" is a general term for web applications that load new pages by loading HTML pages and dynamically updating pages. After the initialization page is loaded, the application communicates with the server through AJAX requests. The app updates the UI using the JSON data returned by the AJAX request.

AJAX is not novel, but today we use the JavaScript framework, which makes it easier to build a large and sophisticated SPA application. This tutorial uses Knockout. js, but you can use any JavaScript client framework.

The main construction blocks of this application are as follows:
1. ASP. net mvc creates an HTML page.
2. ASP. NET Web APIs process AJAX requests and return JSON data.
3. Knockout. js (data) binds HTML elements to JSON data.
4. Entity Framework communicates with the database.

Create a project

Open Visual Studio. Under the File directory, select New and select Project. (Or click New Project on the start page .)

In the New Project dialog box, click Web on the left panel and ASP. NET Web Application on the intermediate panel. Name the project BookService and click OK.

In the New ASP. NET Project dialog box, select the Web API container.

If you want to Host your project in Azure App Service, make Host in the cloud selected.

Configure Azure settings (optional)

If you retain the Host in cloud option selected, Visual Studio will guide you to log on to Microsoft Azure.

After you log on to Azure, Visual Studio also allows you to configure web applications. Enter a name for the site, select your Azure subscription, and select a country and region. Under Database server, select Create new server. Enter the administrator username and password. <喎?http: www.bkjia.com kf ware vc " target="_blank" class="keylink"> VcD4NCjxwPjxpbWcgYWx0PQ = "here write picture description" src = "http://www.bkjia.com/uploads/allimg/160301/0422492432-4.png" title = ""/>

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.