Esempio n. 1
0
        public async Task Consume(ConsumeContext <CustomerRegisteredEvent> context)
        {
            var entity = new MembershipPointsReportingReadModel();

            entity.ApplyEvent(context.Message);
            _context.Add(entity);
            await _context.SaveChangesAsync();
        }
Esempio n. 2
0
        public async Task Handle(CustomerRegisteredEvent simpleEvent)
        {
            var entity = new MembershipPointsReportingReadModel();

            entity.ApplyEvent(simpleEvent);
            _context.Add(entity);
            await _context.SaveChangesAsync();
        }