资源简介
全套asp.net电子商务网站经典三层架构源码,附带数据库和存储过程等等
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
namespace LYSC_MvcCompanyWebSite
{
// 注意: 有关启用 IIS6 或 IIS7 经典模式的说明,
// 请访问 http://go.microsoft.com/?linkId=9394801
public class MvcApplication : System.Web.HttpApplication
{
public static void RegisterGlobalFilters(GlobalFilterCollection filters)
{
filters.Add(new HandleErrorAttribute());
}
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute(“{resource}.axd/{*pathInfo}“);
routes.MapRoute(
“Default“ // 路由名称
“{controller}/{action}/{id}“ // 带有参数的 URL
new { controller = “Login“ action = “Login“ id = UrlParameter.Optional } // 参数默认值
);
//routes.MapRoute(
// “Route1“ “{controller}/{action}/{id}“ new { action = “Login“ }
// );
//routes.MapRoute(
// “Route2“ “{controller}/{action}“
// );
//这时候我传递一个URL为\MusicStore\Order的请求,那么上面的那一个路由将和他匹配呢?
}
protected void Application_Start()
{
AreaRegistration.RegisterAllAreas();
// 默认情况下对 Entity framework 使用 LocalDB
Database.DefaultConnectionFactory = new SqlConnectionFactory(@“Data Source=(localdb)\v11.0; Integrated Security=True; MultipleActiveResultSets=True“);
RegisterGlobalFilters(GlobalFilters.Filters);
RegisterRoutes(RouteTable.Routes);
}
}
}
相关资源
- asp.net C#购物车源代码
- ASP.NET实验室预约管理系统
- 020ASP.NET车辆综合管理系统.zip
- c# 高校档案信息管理系统
- asp.net中c#做的躲避小游戏,希望大家
- ASP.NET C# 工资管理系统
- ASP.NET客户管理系统(毕业设计 C#
- 在线求职系统(C#ASP.NET源码)
- asp.net 在线考试系统及论文
- ASP.Net文件上传管理源码
- C#简单三层架构,免去写增删改查
- 《OA企业办公自动化》asp.net 源码(附
- asp.netc#开发规范
- asp.net 大文件上传(带进度条)
- 通过程序自动填充并提交ASP.NET表单(
- ASP.NET 基础编程文档(PPT电子教案)
-
ASP.NET_xm
l深入编程技术 - asp.net 新闻发布系统源码(附文档以及
- asp.net 简单的Ajax应用
- asp.net 企业官网源码(附数据库)
- asp.net 花语花店销售网站源码(含数据
- ASP.NET资产管理系统源码(附数据库)
- ajax 登录(基于asp.net)
- asp.net 简单新闻发布系统源码(附数据
- asp.net新闻发布系统(源码+数据库+论
- asp.net网上购物系统源码
- ASP.NET 在浏览器中预览文件
- asp.net 生命周期
- asp.net 花语花店销售网站源码(附数据
- asp.net 购物车实现(基于Session)
评论
共有 条评论