/// <summary>
        /// creates a text translation asynchronus, also creates the needed text content
        /// </summary>
        /// <param name="createDto">instance of <see cref="TextContentTranslationCreateDto"/></param>
        /// <returns>id from newly created <see cref="TextContentTranslation"/></returns>
        public async Task <int> CreateAsync(TextContentTranslationCreateDto createDto)
        {
            TextContent textContent = new TextContent();
            await _context.TextContents.AddAsync(textContent);

            await _context.SaveChangesAsync();

            return(await CreateTextContentTranslation(createDto.Text, createDto.Locale, textContent.Id));
        }
Esempio n. 2
0
 public Task <int> CreateAsync(TextContentTranslationCreateDto createDto)
 {
     throw new NotImplementedException();
 }