Issue with DeleteOccurrence in Syncfusion Scheduler using OData v4

I’m using the Syncfusion Scheduler with the OData v4 DataAdapter. Most operations (CRUD) are working correctly, but I’m facing an issue with DeleteOccurrence.

When deleting a single occurrence of a recurring event, it removes the entire series instead of just the selected instance.

Question: How should DeleteOccurrence be properly implemented on the OData v4 controller side to ensure only the selected occurrence is deleted, rather than the entire series?

Controller Setup

services.AddControllers().AddOData(options => options
    .Select()
    .Filter()
    .OrderBy()
    .Expand()
    .Count()
    .SetMaxTop(null)
    .AddRouteComponents(modelBuilder.GetEdmModel(), new DefaultODataBatchHandler()));
    public async Task<IActionResult> Delete([FromRoute] int key)
    {
        var schedule = await context.Schedules.FindAsync(key);
        if (schedule == null) return NotFound();
        context.Schedules.Remove(schedule);
        await context.SaveChangesAsync();
        await cache.EvictByTagAsync(Tag, HttpContext.RequestAborted);
        return NoContent();
    }



1 Reply

VR Vijay Ravi Syncfusion Team July 1, 2026 06:50 AM UTC

Hi Yongkee Cho,


Greetings from Syncfusion Support.

We have reviewed your requirement and validated the OData v4 CRUD sample on our end. When a single occurrence of a recurring event is deleted, only that specific occurrence is removed, not the entire series. Please run the sample and compare it with your implementation. If the issue still persists, share your full use case details, scheduler configuration, and controller code, along with a video demonstration of the issue, so we can investigate further.

Github sample link: SyncfusionExamples/Blazor-Scheduler-CRUD-using-ODATA-adaptor: Blazor scheduler CRUD application using odata adaptor

[Appointment Controller.CS]
 

public class AppointmentController : ODataController

{

    private ScheduleDataContext _db;

    public AppointmentController(ScheduleDataContext context)

    {

        _db = context;

        if (context.EventsData.Count() == 0)

        {

            foreach (var b in DataSource.GetEvents())

            {

                context.EventsData.Add(b);

            }

            context.SaveChanges();

        }

 

    }

    [HttpGet]

    [EnableQuery]

    public IActionResult Get()

    {

        return Ok(_db.EventsData);

    }

 

    public async Task Post([FromBody] Appointment events)

    {

        _db.EventsData.Add(events);

        await _db.SaveChangesAsync();

    }

 

    public async Task Put([FromODataUri] int key, [FromBody] Appointment events)

    {

        var entity = await _db.EventsData.FindAsync(key);

        _db.Entry(entity).CurrentValues.SetValues(events);

        await _db.SaveChangesAsync();

    }

 

    public async Task Patch([FromODataUri] int key, [FromBody] Appointment events)

    {

        var entity = await _db.EventsData.FindAsync(key);

        _db.Entry(entity).CurrentValues.SetValues(events);

        await _db.SaveChangesAsync();

    }

 

    public async Task Delete([FromODataUri] int key)

    {

        var od = _db.EventsData.Find(key);

        _db.EventsData.Remove(od);

        await _db.SaveChangesAsync();

    }

}


Don't hesitate to get in touch if you require further help or more information.
 

Regards,

Vijay


Loader.
Up arrow icon