Exemple #1
0
        public void Post([FromUri] string slug, [FromBody] SeatType seat)
        {
            _tracer.Info(Request, this.ControllerContext.ControllerDescriptor.ControllerType.FullName, "SeatController: POST");

            if (_user == null)
            {
                _tracer.Info(Request, this.ControllerContext.ControllerDescriptor.ControllerType.FullName, "User not found returning 404");
                this.NotFound();
            }

            var conference = this.service.FindConference(slug);

            try
            {
                seat.Id = GuidUtil.NewSequentialId();
                this.service.CreateSeat(conference.Id, seat);
            }
            catch (System.Exception exc)
            {
                _tracer.Error(Request, this.ControllerContext.ControllerDescriptor.ControllerType.FullName, exc);
                throw;
            }
        }
Exemple #2
0
        // GET api/values
        public IList <ConferenceAlias> Get()
        {
            _tracer.Info(Request, this.ControllerContext.ControllerDescriptor.ControllerType.FullName, "ConferenceController: GET");
            if (_user == null)
            {
                _tracer.Info(Request, this.ControllerContext.ControllerDescriptor.ControllerType.FullName, "User not found returning 404");
                this.NotFound();
            }

            return(this._dao.GetPublishedConferences());
        }