public async Task <EntityDto <Guid> > GetGuest(GetGuestInput input) { var currentUserId = AbpSession.UserId; Guest guest; if (currentUserId.HasValue) { guest = await _guestManager.GetByUserIdAsync(currentUserId.Value); await CheckGuestIdAsync(guest, input.GuestId); } else { guest = await _guestManager.CreateAsync(); } return(new EntityDto <Guid>(guest.Id)); }
private async Task <Guid> GetGuestIdFromDatabase(long userId) { var guest = await _guestManager.GetByUserIdAsync(userId); return(guest.Id); }