Exemplo n.º 1
0
        public ActionResult <StuItem> GetMax()
        {
            AthenaDataLayer data = new AthenaDataLayer();
            StuItem         max  = data.maxGPA();

            return(max);
        }
Exemplo n.º 2
0
        public ActionResult <Rsvp> Create(Rsvp r)
        {
            AthenaDataLayer data = new AthenaDataLayer();

            System.Diagnostics.Debug.WriteLine(r.ToString());

            data.RSVP_Function(r);

            return(CreatedAtAction(nameof(GetRSVPS_ById), new { id = r.R_id }, r));
        }
Exemplo n.º 3
0
        public ActionResult <StuItem> GetById(string id, string name)
        {
            AthenaDataLayer data = new AthenaDataLayer();
            StuItem         particular_student = data.findId(id);

            if (particular_student == null)
            {
                return(NotFound());
            }
            if (particular_student.stu_name != name)
            {
                return(NotFound());
            }
            return(particular_student);
        }
Exemplo n.º 4
0
        public IActionResult Delete(string id)
        {
            AthenaDataLayer data = new AthenaDataLayer();

            bool StuItemWasDeleted = data.deleteId(id);

            if (StuItemWasDeleted)
            {
                return(NoContent());
            }
            else
            {
                return(NotFound());
            }
        }
Exemplo n.º 5
0
        public ActionResult <List <TheEvent> > GetAllEvents()
        {
            AthenaDataLayer data = new AthenaDataLayer();

            return(data.getEvents());
        }
Exemplo n.º 6
0
        public ActionResult <List <TheSession> > GetRSVPS_ById(string id)
        {
            AthenaDataLayer data = new AthenaDataLayer();

            return(data.find_SessionsRSVPDfor_byId(id));
        }