Skip to content

Scheduler - Getting Started: Add ASP.NET Core Snippets#9038

Open
arman-boyakhchyan wants to merge 5 commits into
DevExpress:mainfrom
arman-boyakhchyan:scheduler-getting-started-asp-addition-26-2
Open

Scheduler - Getting Started: Add ASP.NET Core Snippets#9038
arman-boyakhchyan wants to merge 5 commits into
DevExpress:mainfrom
arman-boyakhchyan:scheduler-getting-started-asp-addition-26-2

Conversation

@arman-boyakhchyan

Copy link
Copy Markdown
Contributor

No description provided.

@arman-boyakhchyan arman-boyakhchyan self-assigned this Jul 23, 2026
Copilot AI review requested due to automatic review settings July 23, 2026 13:29

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends the Scheduler “Getting Started” documentation by adding ASP.NET Core (DevExtreme Controls) code snippets alongside existing jQuery/Angular/Vue/React examples.

Changes:

  • Added ASP.NET Core Scheduler initialization snippet.
  • Added ASP.NET Core snippets for core configuration topics (current date, views, editing, adaptive mode, time zone editing).
  • Added a larger ASP.NET Core “bind to data” example (Razor + controller + model/data).

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
concepts/05 UI Components/Scheduler/00 Getting Started with Scheduler/02 Create a Scheduler.md Adds an ASP.NET Core snippet that creates a Scheduler in Razor.
concepts/05 UI Components/Scheduler/00 Getting Started with Scheduler/05 Bind the Scheduler to Data.md Adds ASP.NET Core data binding example with MVC data source + controller/model/data snippets.
concepts/05 UI Components/Scheduler/00 Getting Started with Scheduler/07 Set the Current Date.md Adds ASP.NET Core snippet for setting CurrentDate.
concepts/05 UI Components/Scheduler/00 Getting Started with Scheduler/10 Configure Views.md Adds ASP.NET Core snippet for configuring views.
concepts/05 UI Components/Scheduler/00 Getting Started with Scheduler/15 Edit Appointments.md Adds ASP.NET Core snippet for disabling dragging via Editing.
concepts/05 UI Components/Scheduler/00 Getting Started with Scheduler/25 Time Zone Support.md Adds ASP.NET Core snippet for enabling time zone editing via Editing.
concepts/05 UI Components/Scheduler/00 Getting Started with Scheduler/30 Enable Adaptive Mode.md Adds ASP.NET Core snippet for enabling adaptivity.
Comments suppressed due to low confidence (2)

concepts/05 UI Components/Scheduler/00 Getting Started with Scheduler/05 Bind the Scheduler to Data.md:130

  • Update can pass a null appointment to PopulateAppointment and it also does not return an IActionResult. Add a not-found guard and return the updated object (consistent with other ASP.NET Core samples).
        public IActionResult Update(int key, string values) {
            var appointment = SchedulerData.Appointments.FirstOrDefault(e => e.ID == key);
            // ...
            PopulateAppointment(appointment, values);
        }

concepts/05 UI Components/Scheduler/00 Getting Started with Scheduler/05 Bind the Scheduler to Data.md:137

  • Delete does not return an IActionResult, and it can attempt to remove a null appointment if the key is not found. Add a not-found guard and return a result.
        public IActionResult Delete(int key) {
            var appointment = SchedulerData.Appointments.FirstOrDefault(e => e.ID == key);
            // ...
            SchedulerData.Appointments.Remove(appointment);
        }

Copilot AI review requested due to automatic review settings July 23, 2026 13:39

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

concepts/05 UI Components/Scheduler/00 Getting Started with Scheduler/05 Bind the Scheduler to Data.md:148

  • Delete can throw when the specified key is not found (Remove(null) will throw). Add a null check and return NotFound() when no appointment matches the key.
        public IActionResult Delete(int key) {
            var appointment = SchedulerData.Appointments.FirstOrDefault(e => e.ID == key);
            // ...
            SchedulerData.Appointments.Remove(appointment);
            return NoContent();

Comment on lines +111 to +119
using System.Linq;
using System.Text.Json;
using ASP_NET_Core.Models;
using DevExtreme.AspNet.Data;
using DevExtreme.AspNet.Mvc;
using Microsoft.AspNetCore.Mvc;

namespace ASP_NET_Core.Controllers;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can omit this part for brevity

Copilot AI review requested due to automatic review settings July 24, 2026 11:57

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (2)

concepts/05 UI Components/Scheduler/00 Getting Started with Scheduler/05 Bind the Scheduler to Data.md:115

  • The SchedulerDataController snippet is missing the standard using directives and a namespace declaration. As written, it will not compile when copied into an ASP.NET Core project because types like Controller, DataSourceLoadOptions, DataSourceLoader, JsonDocument, and LINQ extensions are not in scope. Add the same header structure used in other ASP.NET Core snippets (for example, concepts/05 UI Components/DataGrid/00 Getting Started with DataGrid/05 Bind the DataGrid to Data.md).
    public class SchedulerDataController : Controller {
        [HttpGet]
        public object Get(DataSourceLoadOptions loadOptions) {
            return DataSourceLoader.Load(SchedulerData.Appointments, loadOptions);
        }

concepts/05 UI Components/Scheduler/00 Getting Started with Scheduler/05 Bind the Scheduler to Data.md:132

  • Update can pass a null appointment into PopulateAppointment(...) when the requested key is not found, which results in a NullReferenceException. Guard against missing records and return a non-success status code (for example, NotFound()) before calling PopulateAppointment.
        [HttpPut]
        public IActionResult Update(int key, string values) {
            var appointment = SchedulerData.Appointments.FirstOrDefault(e => e.ID == key);
            // ...
            PopulateAppointment(appointment, values);
            return Ok(appointment);
        }

Copilot AI review requested due to automatic review settings July 24, 2026 15:02

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.

Comments suppressed due to low confidence (2)

concepts/05 UI Components/Scheduler/00 Getting Started with Scheduler/15 Edit Appointments.md:79

  • This section refers to DevExtreme "events" (options like onAppointmentAdding), not "event handlers" being called by Scheduler. Also, the onAppointmentDeleting link is inconsistent with the other two and should point to the API reference Markdown page.
When users add, edit, or delete appointments, Scheduler calls the following event handlers:

- [onAppointmentAdding](/api-reference/10%20UI%20Components/dxScheduler/1%20Configuration/onAppointmentAdding.md '/Documentation/ApiReference/UI_Components/dxScheduler/Configuration/#onAppointmentAdding/')
- [onAppointmentUpdating](/api-reference/10%20UI%20Components/dxScheduler/1%20Configuration/onAppointmentUpdating.md '/Documentation/ApiReference/UI_Components/dxScheduler/Configuration/#onAppointmentUpdating/')
- [onAppointmentDeleting](/Documentation/ApiReference/UI_Components/dxScheduler/Configuration/#onAppointmentDeleting)

concepts/05 UI Components/Scheduler/00 Getting Started with Scheduler/15 Edit Appointments.md:81

  • After switching to "events" above, this sentence should also refer to events (not handlers) and include the article before Scheduler.
You can use these handlers to extend Scheduler's functionality. The following example configures **onAppointmentAdding** and **onAppointmentUpdating** to prevent adding or moving appointments to cells with existing recurring appointments:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants