/// <summary>
        /// Function to map the Guest entity to PersonBase.
        /// </summary>
        /// <param name="guest">Instance of Guest</param>        
        /// <returns>Instance of PersonBase</returns>
        public static PersonBase MapToPersonBase(this Guest guest)
        {
            if (guest == null)
            {
                throw new ArgumentNullException("guest");
            }

            var personBase = new PersonBase();
            personBase.PersonId = guest.GuestId;
            personBase.PersonType = PersonType.Guest;
            personBase.SecurityPhotoAddress = guest.SecurityPhotoAddress;
            personBase.Stateroom = guest.CruiseDetail != null ? guest.CruiseDetail.Stateroom : string.Empty;
            personBase.PersonalDetail = guest.PersonalDetail;
            personBase.CruiseDetail = guest.CruiseDetail;
            personBase.Photo = guest.Photo;
            personBase.IsPhotoAddedInCartForSwap = SwapPhotoManager.Instance.PhotoExistsInCart(personBase.PersonId);
            personBase.AssignPhotoByteArray(guest.PhotoByteArray);
            personBase.AssignPortAuthorizations(guest.PortAuthorizations);
            personBase.AssignAlerts(guest.Alerts);
            personBase.AssignFolios(guest.Folios);
            personBase.HasAlert = guest.HasAlert;
            personBase.HasMessage = guest.HasMessage;
            personBase.AreAllMessagesGotAcknowledged = guest.AreAllMessagesGotAcknowledged;
            personBase.IsOnboard = guest.IsOnboard;
            personBase.PersonTypeId = CommonConstants.GuestTypeId;
            personBase.LastDateTime = guest.LastDateTime;
            personBase.LastEvent = guest.LastEvent;
            personBase.IsParentalAuthorizationAlertOverridden = guest.IsParentalAuthorizationAlertOverridden;
            personBase.IsBirthdayToday = guest.IsBirthdayToday;
            personBase.IsAnniversaryDayToday = guest.IsAnniversaryDayToday;
            personBase.IsOnboardWithoutCheckIn = guest.IsOnboardWithoutCheckIn;
            personBase.IsDisabledCard = guest.IsDisabledCard;
            personBase.AllowOnboardAlert = guest.AllowOnboardAlert;
            personBase.AssignPersonMessages(guest.Messages);

            return personBase;
        }