Ramco Ramco

Ramco Ramco

  • 445
  • 3.4k
  • 530.3k

Error - Cannot implicitly convert type int? to int

Apr 5 2023 12:36 PM

Hi

  I am geting above error on return statement

public int UpdateStudentBreak(StudentsBreak student)
        {
            try
            {
                context.SubmitChanges();
                return student.StudentId;
            }
            catch (Exception ex)
            {
                return 0;
            }
        }

Thanks


Answers (1)