public ActionResult GetPhoto(int id) { try { var face = faceManager.GetById(id); return(new FileStreamResult(new MemoryStream(face != null ? face.Photo : default(byte[])), "image/png")); } catch (Exception ex) { logger.Error(ex); return(new HttpStatusCodeResult(HttpStatusCode.BadRequest, ex.Message)); } }
public byte[] GetCustomerPhoto(int id) { var face = faceManager.GetById(id); return(face != null ? face.Photo : default(byte[])); }