public Task <SaveResult> SaveAsync(UserRegistrationProcess process) { var streamId = StreamBy(process.UserId); var result = _eventStoreStub.Save( streamId, process.GetPendingEvents(), process.Version); return(Task.FromResult(result)); }
public Task <SaveResult> SaveAsync(User user) { if (user == null) { throw new ArgumentNullException(nameof(user)); } var streamId = StreamId(user.Id); var result = _eventStoreStub.Save(streamId, user.GetPendingEvents(), user.Version); return(Task.FromResult(result)); }