Demo
In this demo I use serveral methods
in different part of the project.
I also use third party components of
Javascript UI Widgets https://www.jqwidgets.com/jquery-widgets-documentation
This project included:
Services |
WCF, WebApi |
Database |
SQL Server 2012 |
Server App |
MVC, AngularJS, Ajax, JQuery,
jqxGrid |
Client App |
Webapi, Ajax, html, boostrap,
jquery, css, and AngularJS |
In my projects I use mix of technology. I can use MVC or MVC call WCF or MVC call WebApi for the entire project, but I
combine them into one project
WebApiConfig.cs
In this api config I can have more routes and new routes need to be before Default route
using System.Web.Http;
namespace UsedCar
{
public static class WebApiConfig
{
public static void Register(HttpConfiguration config)
{
// Web API configuration and services
// Web API routes
config.MapHttpAttributeRoutes();
config.Routes.MapHttpRoute(
name: "ActionApi",
routeTemplate: "api/{controller}/{action}/{id}",
defaults: new { id = RouteParameter.Optional }
);
config.Routes.MapHttpRoute(
name: "DefaultApi",
routeTemplate: "api/{controller}/{id}",
defaults: new { id = RouteParameter.Optional }
);
}
}
}