We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Value of Primary Key in the documentation

Thread ID:





143255 Mar 11,2019 11:01 PM UTC Mar 12,2019 07:21 AM UTC ASP.NET MVC - EJ 2 1
Tags: Schedule
Asked On March 11, 2019 11:01 PM UTC

In the page:

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();

Karthigeyan Krishnamurthi [Syncfusion]
Replied On March 12, 2019 07:21 AM UTC

Hi  Francesco,   
Thank you for contacting Syncfusion support. 
We will refresh the UG with your valuable suggestion on or before March 19, 2019. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon