Esempio n. 1
0
        public async Task AddAsync(Post post)
        {
            Validator.Validate(post);

            var postAlreadyAdded = await GetAsync(post.Id);

            if (postAlreadyAdded != null)
                throw new Exception("already added");

            await repository.AddAsync(post);
        }