Пример #1
0
    public Task AddPostAsync(Post post)
    {
        if (post == null)
        {
            throw new ArgumentNullException(nameof(post));
        }

        return(Task.WhenAll(
                   _repo.AddPostAsync(post),
                   _cache.AddPostAsync(post)
                   ));
    }