Tailspin Spyworks Guide 2: Data access layer

Source: Internet
Author: User

Part 2: Data Access Layer By Joe Stagner | July 21,201 0 Translated By litdwg | March
Print

Tailspin Spyworks demonstrates how extraordinarily simple it is to create powerful, scalable applications for. NET platform. it shows off how to use the great new features in ASP. NET 4 to build an online store, including shopping, checkout, and administration.

Use Tailspin Spyworks to demonstrate how simple a well-structured application can be created on the. NET platform. Demonstrate how to use the new features of ASP. NET 4 to create an online shop that includes shopping, settlement, and management functions.

This tutorial series details all of the steps taken to build the Tailspin Spyworks sample application. Part 2 covers adding the data access layer.

This series of guides gives a detailed explanation of each step of the build case program. The second part describes how to add a data access layer.

Add data access layer

Our ecommerce application will depend on two databases.

This e-commerce program will need two databases.

For customer information we'll use the standard ASP. NET Membership database. For our shopping cart and product catalog we'll implement a SQL Express database as follows.

We will use standard ASP. NET Membership database. The shopping cart and product data will be saved by creating a new database.

Having created the database (Commerce. mdf) in the application "s App_Data folder we can proceed to create our Data Access Layer using the. NET Entity Framework.

After creating a database (Commerce. mdf) in the App_Data folder, we use. NET EntityFramework to create a data access layer. (Tip: You can also directly create this database in SQL Server Standard Edition ).

We'll create a folder named "Data_Access" and them right click on that folder and select "Add New Item ".

Create a folder named "Data_Access" and Right-click it and select "Add new project ".

In the "Installed Templates" item and then select "ADO. NET Entity Data Model" enter edm_performance.edmx as the name and click the "Add" button.

In the dialog box, select "ADO. NET Entity Data Model", name it edm_performance.edmx, and click "add.

Choose "Generate from Database ".

Select generate from database.

Save and build.

Save and generate.

Now we are ready to add our first feature-a product category menu.

Now we are ready to add the new feature-product directory.

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.