public void SetUserStatus(UserStateStatus userStateStatus)
        {
            mapper.Insert(userStateStatus);
            var userStateHistory = new UserStateHistory
            {
                UserToken       = userStateStatus.UserToken,
                StatusChangedOn = userStateStatus.StatusChangedOn,
                StatusId        = userStateStatus.StatusId
            };

            mapper.Insert(userStateHistory);
        }
        public void RegisterUser(UserInfo userInfo)
        {
            var userState = new UserState
            {
                UserToken       = userInfo.UserToken,
                UserName        = userInfo.UserName,
                StatusId        = userInfo.StatusId,
                StatusChangedOn = userInfo.StatusChangedOn
            };

            mapper.Insert(userState);
            var userStateHistory = new UserStateHistory
            {
                UserToken       = userInfo.UserToken,
                StatusChangedOn = userInfo.StatusChangedOn,
                StatusId        = userInfo.StatusId
            };

            mapper.Insert(userStateHistory);
        }