Exemple #1
0
        public IActionResult Create([FromBody] SessionWriteDto sessionDto)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            var newSession = _sessionLogic.Create(sessionDto);

            return(CreatedAtAction(nameof(GetById), new { sessionEntityId = newSession.Id }, sessionDto));
        }