Skip to content

Commit 4d04e7e

Browse files
951563: Dapper Sample Added
1 parent fc065ca commit 4d04e7e

File tree

298 files changed

+170884
-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.

298 files changed

+170884
-0
lines changed
Binary file not shown.
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
using System.Web;
2+
using System.Web.Optimization;
3+
4+
namespace MyWebService
5+
{
6+
public class BundleConfig
7+
{
8+
// For more information on bundling, visit https://go.microsoft.com/fwlink/?LinkId=301862
9+
public static void RegisterBundles(BundleCollection bundles)
10+
{
11+
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
12+
"~/Scripts/jquery-{version}.js"));
13+
14+
bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
15+
"~/Scripts/jquery.validate*"));
16+
17+
// Use the development version of Modernizr to develop with and learn from. Then, when you're
18+
// ready for production, use the build tool at https://modernizr.com to pick only the tests you need.
19+
bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
20+
"~/Scripts/modernizr-*"));
21+
22+
bundles.Add(new Bundle("~/bundles/bootstrap").Include(
23+
"~/Scripts/bootstrap.js"));
24+
25+
bundles.Add(new StyleBundle("~/Content/css").Include(
26+
"~/Content/bootstrap.css",
27+
"~/Content/site.css"));
28+
}
29+
}
30+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
using System.Web;
2+
using System.Web.Mvc;
3+
4+
namespace MyWebService
5+
{
6+
public class FilterConfig
7+
{
8+
public static void RegisterGlobalFilters(GlobalFilterCollection filters)
9+
{
10+
filters.Add(new HandleErrorAttribute());
11+
}
12+
}
13+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Web;
5+
using System.Web.Mvc;
6+
using System.Web.Routing;
7+
8+
namespace MyWebService
9+
{
10+
public class RouteConfig
11+
{
12+
public static void RegisterRoutes(RouteCollection routes)
13+
{
14+
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
15+
16+
routes.MapRoute(
17+
name: "Default",
18+
url: "{controller}/{action}/{id}",
19+
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
20+
);
21+
}
22+
}
23+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Web.Http;
5+
6+
namespace MyWebService
7+
{
8+
public static class WebApiConfig
9+
{
10+
public static void Register(HttpConfiguration config)
11+
{
12+
// Enable Attribute Routing
13+
config.MapHttpAttributeRoutes();
14+
15+
// Remove XML formatter (ensure JSON responses)
16+
config.Formatters.JsonFormatter.SerializerSettings.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore;
17+
config.Formatters.Remove(config.Formatters.XmlFormatter);
18+
19+
20+
config.Routes.MapHttpRoute(
21+
name: "DefaultApi",
22+
routeTemplate: "api/{controller}/{id}",
23+
defaults: new { id = RouteParameter.Optional }
24+
);
25+
}
26+
}
27+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/* Set padding to keep content from hitting the edges */
2+
.body-content {
3+
margin-top: 15px;
4+
padding-left: 15px;
5+
padding-right: 15px;
6+
}
7+
8+
/* Override the default bootstrap behavior where horizontal description lists
9+
will truncate terms that are too long to fit in the left column
10+
*/
11+
.dl-horizontal dt {
12+
white-space: normal;
13+
}
14+
15+
/* Set width on the form input elements since they're 100% wide by default */
16+
input,
17+
select,
18+
textarea {
19+
max-width: 280px;
20+
}

0 commit comments

Comments
 (0)