Skip to content

Commit 44b6c4f

Browse files
authored
add contoso project (#46)
1 parent bf4a104 commit 44b6c4f

File tree

91 files changed

+34113
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+34113
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Visual Studio files
2+
bin/
3+
obj/
4+
*.user
5+
*.suo
6+
*.cache
7+
packages/
8+
.vs/
9+
10+
# Uploaded files - exclude all uploaded content
11+
Uploads/TeachingMaterials/*
12+
# But keep the directory structure
13+
!Uploads/TeachingMaterials/.gitkeep
14+
# Exclude any config files in uploads directory
15+
Uploads/web.config
16+
17+
# Logs
18+
*.log
19+
20+
# Temporary files
21+
*.tmp
22+
*.temp
23+
24+
# Database files
25+
*.mdf
26+
*.ldf
27+
App_Data/*.mdf
28+
App_Data/*.ldf
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
using System.Web.Optimization;
2+
3+
namespace ContosoUniversity
4+
{
5+
public class BundleConfig
6+
{
7+
public static void RegisterBundles(BundleCollection bundles)
8+
{
9+
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
10+
"~/Scripts/jquery-{version}.js"));
11+
12+
bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
13+
"~/Scripts/jquery.validate*"));
14+
15+
bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
16+
"~/Scripts/modernizr-*"));
17+
18+
bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
19+
"~/Scripts/bootstrap.js",
20+
"~/Scripts/respond.js"));
21+
22+
bundles.Add(new StyleBundle("~/Content/css").Include(
23+
"~/Content/bootstrap.css",
24+
"~/Content/site.css"));
25+
}
26+
}
27+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
using System.Web.Mvc;
2+
3+
namespace ContosoUniversity
4+
{
5+
public class FilterConfig
6+
{
7+
public static void RegisterGlobalFilters(GlobalFilterCollection filters)
8+
{
9+
filters.Add(new HandleErrorAttribute());
10+
// Remove the global authorization filter since we're implementing role-based authorization
11+
// filters.Add(new AuthorizeAttribute()); // Require authentication for all controllers
12+
}
13+
}
14+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
using System.Web.Mvc;
2+
using System.Web.Routing;
3+
4+
namespace ContosoUniversity
5+
{
6+
public class RouteConfig
7+
{
8+
public static void RegisterRoutes(RouteCollection routes)
9+
{
10+
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
11+
12+
routes.MapRoute(
13+
name: "Default",
14+
url: "{controller}/{action}/{id}",
15+
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
16+
);
17+
}
18+
}
19+
}

0 commit comments

Comments
 (0)