Esempio n. 1
0
        public async Task <IActionResult> PostContent(string app, string name, CreateContentDto request)
        {
            var command = request.ToCommand();

            var response = await InvokeCommandAsync(command);

            return(CreatedAtAction(nameof(GetContent), new { app, name, id = command.ContentId }, response));
        }
Esempio n. 2
0
 public async Task CreateContent(CreateContentDto input)
 {
     var content = _mapper.Map <Content>(input);
     await _contentRepository.InsertAsync(content);
 }