Exemple #1
0
        public async Task Handle(AddPostCommand command, CancellationToken cancellationToken)
        {
            var post = new Post
            {
                Uuid        = Guid.NewGuid().ToString(),
                Description = command.Description,
                MediaURL    = command.ResourceName ?? string.Empty,
                CreatedDate = DateTime.Now,
                UserUuid    = command.UserUuid
            };

            await _repo.AddPost(post);
        }