It looks like Emp.Photo
is null
and calling ToArray()
is giving you the null reference exception. Try this:
if (Emp.Photo != null)
{
pictureBoxEmp.Image = byteArrayToImage(Emp.Photo.ToArray());
pictureBoxEmp.SizeMode = PictureBoxSizeMode.StretchImage;
}