Exemplo n.º 1
0
        public IActionResult Search([FromBody] DataLayer.Models.CovidTestSearch model)
        {
            try
            {
                DataLayer.Models.CovidTestDBModel result = CovidTest.GetCovidRecord(_context, model);
                if (result == null)
                {
                    return(NotFound());
                }

                return(Ok(result));
            }
            catch (Exception ex)
            {
                return(BadRequest(ex.Message));
            }
        }
Exemplo n.º 2
0
        public IActionResult Find(string id, string patient_first_name, string patient_last_name, string patient_email)
        {
            DataLayer.Models.CovidTestJson   json;
            DataLayer.Models.CovidTestSearch search = new DataLayer.Models.CovidTestSearch();
            search.CovidTestId        = id;
            search.patient_email      = patient_email;
            search.patient_first_name = patient_first_name;
            search.patient_last_name  = patient_last_name;

            json = DataLayer.CovidTest.GetCovidJson(_context, search);

            if (json == null)
            {
                return(NotFound());
            }

            return(Ok(json));
        }