0
ramezani583 created
hi, Why does not go to "catch" when an error occurred? Why error handling is not available to me?
protected virtual async Task CreateStudentAsync(CreateOrUpdateStudentInput input)
{
var student = new Student
{
StudentNumber = input.Student.StudentNumber,
Name = input.Student.Name,
Surname = input.Student.Surname,
Degree = input.Student.Degree
};
try
{
await _studentRepository.InsertAsync(student); //It's done to get Id of the student.
}
catch (Exception e)
{
Console.WriteLine(e);
throw;
}
}
1 Answer(s)
-
0
Please format code properly.
Did you put a breakpoint at Console.WriteLine(e)?