public IHttpActionResult PutAlunoTDB(long id, AlunoTDB alunoTDB)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != alunoTDB.idAluno)
            {
                return(BadRequest());
            }

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

            try
            {
                db.SaveChanges();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!AlunoTDBExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(StatusCode(HttpStatusCode.NoContent));
        }
        public IHttpActionResult GetAlunoTDB(long id)
        {
            AlunoTDB alunoTDB = db.AlunoTDB.Find(id);

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

            return(Ok(alunoTDB));
        }
        public IHttpActionResult PostAlunoTDB(AlunoTDB alunoTDB)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            db.AlunoTDB.Add(alunoTDB);
            db.SaveChanges();

            return(CreatedAtRoute("DefaultApi", new { id = alunoTDB.idAluno }, alunoTDB));
        }
        public IHttpActionResult DeleteAlunoTDB(long id)
        {
            AlunoTDB alunoTDB = db.AlunoTDB.Find(id);

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

            db.AlunoTDB.Remove(alunoTDB);
            db.SaveChanges();

            return(Ok(alunoTDB));
        }