Example #1
0
        public IActionResult GetById(Guid id)
        {
            var timeslotEntity = _timeslotService.GetById(id);
            var timeslotDto    = _mapper.Map <TimeslotDto>(timeslotEntity);

            return(Ok(timeslotDto));
        }
Example #2
0
        public Session Create(Session session, Guid timeslotId)
        {
            var timeslot = _timeslotService.GetById(timeslotId);

            session.Time = timeslot;

            return(Create(session));
        }