Exemplo n.º 1
0
 public FileStreamResult GetEye(int id)
 {
     try
     {
         var data = DiagnosisData.Get(id).Eye.Data;
         return(new FileStreamResult(data.ToStream(), "image/jpeg"));
     }
     catch (Exception)
     {
         return(new FileStreamResult(Stream.Null, "image/jpeg"));
     }
 }
Exemplo n.º 2
0
        public IActionResult Get(int id)
        {
            string content;

            try
            {
                content = JsonConvert.SerializeObject(DiagnosisData.Get(id));
            }
            catch (Exception)
            {
                return(NotFound(id));
            }

            return(Content(content, "application/json"));
        }