Пример #1
0
        public IHttpActionResult GetPatientEntity(int id)
        {
            PatientEntity patientEntity = db.Find(id);

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

            return(Ok(patientEntity));
        }
Пример #2
0
        // GET: Patient/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            PatientEntity patientEntity = db.Find(id);

            if (patientEntity == null)
            {
                return(HttpNotFound());
            }
            return(View(patientEntity));
        }