1
Answer

Error - Cannot implicitly convert type int? to int

Ramco Ramco

Ramco Ramco

1y
1.1k
1

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)