public async Task Handle(CustomerUpdated notification, CancellationToken cancellationToken)
 {
     await _context.Update(f => f.Id == notification.Id,
                           new Customer()
     {
         Id        = notification.Id,
         Honorific = notification.Honorific,
         FirstName = notification.FirstName,
         LastName  = notification.LastName
     });
 }
Пример #2
0
 public async Task Handle(CustomerUpdated notification, CancellationToken cancellationToken)
 {
     await _context.Update(f => f.Id == notification.Id,
                           new CustomerOrders
     {
         Id        = notification.Id,
         FirstName = notification.FirstName,
         LastName  = notification.LastName,
         Honorific = notification.Honorific,
         Orders    = new List <CustomerOrder>()
     });
 }