Esempio n. 1
0
        public async Task AddAsync(int?authorId, int?textId, string content)
        {
            var suggestion = new Suggestion(content, 0);

            if (authorId != null)
            {
                suggestion.SetAuthor(new User((int)authorId));
            }
            if (textId != null)
            {
                suggestion.SetText(new Text((int)textId));
            }

            await suggestionRepository.AddAsync(suggestion);
        }