public async Task <IActionResult> RetrievePhotoByStudentId(long studentId) { try { var photo = await _studentAppService.RetrievePhotoByStudentId(studentId); if (photo != null) { return(Ok(photo)); } return(BadRequest("No image found")); } catch (Exception ex) { return(BadRequest(ex.Message)); } }