예제 #1
0
        public async Task Handle(MembershipCreatedEvent notification, CancellationToken cancellationToken)
        {
            var membership = new MembershipReadModel();

            membership.ApplyEvent(notification);
            _readModelDbContext.Add(membership);
            await _readModelDbContext.SaveChangesAsync();
        }