public async Task Consume(ConsumeContext <CustomerRegisteredEvent> context) { var entity = new MembershipPointsReportingReadModel(); entity.ApplyEvent(context.Message); _context.Add(entity); await _context.SaveChangesAsync(); }
public async Task Handle(CustomerRegisteredEvent simpleEvent) { var entity = new MembershipPointsReportingReadModel(); entity.ApplyEvent(simpleEvent); _context.Add(entity); await _context.SaveChangesAsync(); }