public async Task Handle(SayHelloALot command, IMessageHandlerContext ctx) { Processed++; var user = await _uow.For <User>().Get(command.User); user.SayHelloALot(command.Message); }
public async Task Handle(SayHelloALot command, IMessageHandlerContext ctx) { Processed++; var user = await _uow.For <User>().TryGet(command.User); if (user == null) { user = await _uow.For <User>().New(command.User); user.Create(); } user.SayHelloALot(command.Message); }