Exemplo n.º 1
0
        public async Task <ActionResult <ThemeDTO> > CreateThemeAsync(CreateThemeVM themeVM)
        {
            var createdTheme = await themeService
                               .CreateAsync(mapper.Map <ThemeDTO>(themeVM), GetCurrentUserId());

            return(CreatedAtAction(nameof(GetTheme), new { id = createdTheme.Id }, createdTheme));
        }
Exemplo n.º 2
0
        public async Task <IActionResult> CreateTheme(CreateThemeVM model)
        {
            var dtoModel = mapper.Map <CreateThemeModel>(model);
            var result   = await themesManager.CreateAsync(dtoModel);

            return(Json(result));
        }