You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: "Learn how to enable the Web API binding capabilities of the Telerik UI Scheduler for {{ site.framework }}."
5
6
slug: htmlhelpers_scheduler_webapi_binding
6
7
---
7
8
8
-
# WebAPI Binding
9
+
# Web API Binding
9
10
10
-
Web API is an application programming interface for a web application or server which utilizes the [HTTP protocol](https://developer.mozilla.org/en-US/docs/Web/HTTP/Overview) for communication. It enables you to make the server-side of the application more monolithic when it comes to establishing communication between clients and websites to have data access.
11
+
Web API is an application programming interface for a web application or server that utilizes the [HTTP protocol](https://developer.mozilla.org/en-US/docs/Web/HTTP/Overview) for communication. It enables you to make the server-side of the application more monolithic when it comes to establishing communication between clients and websites to have data access.
11
12
12
-
For a runnable example, refer to the [demo on WebAPI binding of the Scheduler component](https://demos.telerik.com/{{ site.platform }}/scheduler/webapi).
13
+
{% if site.core %}
14
+
For a runnable example, refer to the [demo on Web API binding of the Scheduler component](https://demos.telerik.com/{{ site.platform }}/scheduler/webapi).
15
+
{% else %}
16
+
For a runnable example, refer to the [demo on Web API binding of the Scheduler component](https://demos.telerik.com/{{ site.platform }}/scheduler/webapi) or review the [ASP.NET MVC application](https://github.com/telerik/ui-for-aspnet-mvc-examples/tree/master/Telerik.Examples.Mvc/Telerik.Examples.Mvc/Areas/SchedulerEditingWebApi) in the [UI for ASP.NET MVC Examples repository](https://github.com/telerik/ui-for-aspnet-mvc-examples/tree/master)
17
+
{% endif %}
13
18
14
19
{% if site.mvc %}
15
20
16
-
## Setting up the application for WebAPI Binding
21
+
## Setting up the Application for Web API Binding
17
22
18
-
To ensure that the application is configured for both Web API binding capabilities:
23
+
To ensure that the application is configured for Web API binding:
19
24
20
-
* Configure Web API by calling `GlobalConfiguration.Configure` in the `Application_Start` method.
25
+
* Configure the Web API by calling `GlobalConfiguration.Configure` in the `Application_Start` method.
21
26
22
27
```
23
28
public class MvcApplication : System.Web.HttpApplication
@@ -30,7 +35,7 @@ To ensure that the application is configured for both Web API binding capabiliti
30
35
}
31
36
```
32
37
33
-
* Create a file named `WebApiConfig.cs`inside the `App_Start` folder and configure the default WebAPI routing convention.
38
+
* Create a file named `WebApiConfig.cs`into the `App_Start` folder and configure the default Web API routing convention.
34
39
35
40
```
36
41
public static class WebApiConfig
@@ -53,7 +58,7 @@ To ensure that the application is configured for both Web API binding capabiliti
53
58
54
59
## Adding a Web API Controller
55
60
56
-
To support writing and reading data using WebAPI endpoints, the {% if site.core %} `ControllerBase` {%else%} `ApiController` {% endif %} base class needs to be inherited for a given controller instance.
61
+
To support writing and reading data using Web API endpoints, the {% if site.core %} `ControllerBase` {%else%} `ApiController` {% endif %} base class needs to be inherited for a given controller instance.
57
62
58
63
{% if site.core %}
59
64
```
@@ -220,9 +225,9 @@ public class TaskController : System.Web.Http.ApiController
220
225
221
226
## Configuring the Scheduler DataSource for Web API Binding
222
227
223
-
To configure CRUD operations that support Web API Binding, explicitly add a `WebApi()` configuration method within the DataSource. {% if site.mvc %} From there, explicitly specify the WebAPI endpoints by using the `Url.HttpRouteUrl()` extension method. {% endif %}
228
+
To enable the CRUD operations that support Web API Binding, explicitly add a `WebApi()` configuration method within the DataSource. {% if site.mvc %} Also, specify explicitly the Web API endpoints by using the `Url.HttpRouteUrl()` extension method. {% endif %}
224
229
225
-
> Note that a unique identifier for both the `Update` and `Delete` operations is passed as a [`RouteValueDictionary`]{% if site.core %}(https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.routing.routevaluedictionary?view=aspnetcore-7.0){% else %}(https://learn.microsoft.com/en-us/dotnet/api/system.web.routing.routevaluedictionary?view=netframework-4.8.1){% endif %} which is then processed on the server-side {% if site.core %}through the [`HttpMethodAttribute`](https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.mvc.routing.httpmethodattribute?view=aspnetcore-7.0).{% else %} as an Action Method argument.{% endif %}
230
+
> Note that a unique identifier for both the `Update` and `Delete` operations is passed as a [`RouteValueDictionary`]{% if site.core %}(https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.routing.routevaluedictionary?view=aspnetcore-7.0){% else %}(https://learn.microsoft.com/en-us/dotnet/api/system.web.routing.routevaluedictionary?view=netframework-4.8.1){% endif %}, which is then processed on the server {% if site.core %}through the [`HttpMethodAttribute`](https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.mvc.routing.httpmethodattribute?view=aspnetcore-7.0).{% else %} as an Action Method argument.{% endif %}
226
231
227
232
{% if site.core %}
228
233
```HtmlHelper
@@ -328,7 +333,6 @@ To configure CRUD operations that support Web API Binding, explicitly add a `Web
328
333
```
329
334
{% endif %}
330
335
331
-
332
336
## See Also
333
337
334
338
*[Web API Binding by the Scheduler HtmlHelper for {{ site.framework }} (Demo)](https://demos.telerik.com/{{ site.platform }}/scheduler/webapi)
Copy file name to clipboardExpand all lines: docs-aspnet/html-helpers/scheduling/scheduler/how-to/lock-edited-events-with-signalr-datasource-local-hub.md
Copy file name to clipboardExpand all lines: docs-aspnet/html-helpers/scheduling/scheduler/how-to/show-tooltip-with-additional-information-over-events.md
0 commit comments