Esempio n. 1
0
        public ActionResult <Consultation> Post([FromBody] Consultation consultation)
        {
            var service = new ConsultationService();

            service.Store(consultation);

            return(consultation);
        }
Esempio n. 2
0
        public ActionResult <Consultation> Put(long id, [FromBody] Consultation consultation)
        {
            var service = new ConsultationService();

            if (service.GetID(id) == null)
            {
                return(NotFound());
            }

            consultation.ConsultationID = id;

            service.Store(consultation);

            return(consultation);
        }