public IHttpActionResult Post(DemoPerson person)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }

            DemoPerson DPDdata = new DemoPerson() { PersonID = Guid.NewGuid() };

            DPDdata.PersonName = person.PersonName;
            DPDdata.PersonSex = person.PersonSex;
            DPDdata.PersonBirthday = person.PersonBirthday;

            db.DemoPersons.Add(DPDdata);

            try
            {
                db.SaveChanges();
            }
            catch (Exception ex)
            {
                throw;
            }

            return CreatedAtRoute("DefaultApi", new { id = DPDdata.PersonID }, DPDdata);
        }
        public ActionResult Create(DemoPerson person)
        {
            if (ModelState.IsValid)
            {
                person.PersonID = Guid.NewGuid();
                adb.DemoPersons.Add(person);
                adb.SaveChanges();
                return RedirectToAction("Index");
            }

            return View();
        }
        public IHttpActionResult Put(Guid? id, DemoPerson person)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }

            DemoPerson Oriperson = db.DemoPersons.Find(id);
            Oriperson.PersonName = person.PersonName == null ? Oriperson.PersonName : person.PersonName;
            Oriperson.PersonSex = person.PersonSex == null ? Oriperson.PersonSex : person.PersonSex;
            Oriperson.PersonBirthday = person.PersonBirthday == null ? Oriperson.PersonBirthday : person.PersonBirthday;

            db.Entry(Oriperson).State = EntityState.Modified;

            try
            {
                db.SaveChanges();
            }
            catch (Exception ex)
            {
                throw;
            }

            //return StatusCode(HttpStatusCode.NoContent); //回傳空值
            return Ok(Oriperson);
        }