예제 #1
0
        public async Task <ActionResult <ThemeDto> > CreateTheme([FromBody] ThemeDto themeDto)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            var dto = await _themeService.CreateEntityAsync(themeDto);

            if (dto == null)
            {
                return(StatusCode(500));
            }

            return(Ok(dto));
        }