zoukankan      html  css  js  c++  java
  • Creating a LINQ Enabled ASP.NET Web application template using C#.[转]

    原文地址:http://www.wwwcoder.com/Weblogs/tabid/283/EntryID/839/Default.aspx

    其他相关地址:Building and using a LINQ for SQL Class Library with ASP.NET 2.0

             1. Install Visual Studio 2005 RTM.
             2. Download and install "Visual Studio 2005 Web Application Projects" at http://msdn.microsoft.com/asp.net/reference/infrastructure/wap/
             3. Install "C# LINQ Tech Preview Update for Visual Studio 2005 RTM Release" from the Downloads section at http://download.microsoft.com/download/4/7/0/4703eba2-78c4-4b09-8912-69f6c38d3a56/LINQ%20Preview.msi
             4. Start Visual Studio 2005 and create a "New Project" (NOT a New Website). In project templates under Visual C# Project Types, select "ASP.NET Application", type a name for the project and click OK.
             5. Close Visual Studio 2005.
             6. In Windows Explorer, go to the newly created project folder (typically in My Documents/Visual Studio 2005/Projects/ProjectName/) and open the .csproj file using notepad.
             7. Replace the following line: 
       1.

          with:
             1. Open your project with Visual Studio 2005 and Right click on your web application project in the Solution Explorer and Select Add Reference….
             2. Add references to the following libraries by selecting them in the list box listed under .NET Tab:
                   1. System.Query.dll
                   2. System.Data.DLinq.dll
                   3. System.Xml.XLINQ.dll 
             3. Click OK.
             4. View code of your default.aspx (open default.aspx.cs)
             5. Add the following lines in your using section
                   1. using System.Query;
                   2. using System.Data.DLinq;
                   3. using System.Xml;
                   4. using System.Xml.XLinq; 
             6. With the project opened in Visual Studio 2005, in the File menu, select "Export Template"
             7. Select "Project Template" option, then click the Next> button
             8. Type "LINQ Web Application using C#" in the Template Name textbox
             9. Type "A project to create an ASP.NET Web Application using LINQ and C#." in the Template Description textbox.
            10. Keep other defaults and click on the Finish button.
            11. Using Windows Explorer, open the folder My Documents"Visual Studio 2005"Templates"Project Templates"
            12. Move the file "LINQ Web Application.zip" to the Visual C#"LINQ Preview subfolder.
            13. Now, to create a new LINQ enabled web application using the user project template.
            14. In the File menu, select "New project"
            15. Select the Visual C#"LINQ Preview node in the left tree view
            16. Select LINQ Web Application using C#.
            17. Name your web application project and click OK.
            18. Happy LINQing with Web Application.
          Three cheers to Hector Cruz post on forums.microsoft.com to show how to create ASP.NET Web Application using LINQ and VB.NET 9.0 Preview (http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=296346
    &SiteID=1)

  • 相关阅读:
    day06-Java方法和数组(二)
    day05作业-----------Java方法和数组
    day01作业-------------Java概述
    day04--Java流程控制
    获取数据库连接对象的方法
    oracle数据库时间的处理
    把页面获得的String格式的时间转换成date存入到数据库
    复选下拉菜单
    log4j实现日志记录(搬运)
    js点击按钮打开下拉菜单,再次点击关闭的简单办法
  • 原文地址:https://www.cnblogs.com/RuiLei/p/1172592.html
Copyright © 2011-2022 走看看