In the page:
https://ej2.syncfusion.com/aspnetmvc/documentation/schedule/data-binding/?no-cache=1#using-custom-adaptor
you suggest this code for the primary key:
int intMax = db.ScheduleEventDatas.ToList().Count > 0 ? db.ScheduleEventDatas.ToList().Max(p => p.Id) : 1;
...
Id = intMax + 1,
this solution is not performant. I suggest this code:
int intMax = db.ScheduleEventDatas
.Select(x => x.Id).DefaultIfEmpty(0).Max();