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); }