public HttpResponseMessage UpdateProfileIdBasedOnGuid(long fpuserid, Guid personGuid)
        {
            if (!IsEnableAnonymous)
            {
                return(Request.CreateResponse(HttpStatusCode.OK, new
                {
                    FPUserID = 0
                }));
            }
            if (personGuid == null)
            {
                return(Request.CreateResponse(HttpStatusCode.NoContent, new HttpError(ErrorInfo.UserNotFound)));
            }
            var result = 0;
            //var person = ProfileDbContext.People.Where(p => p.PersonGuid.Equals(personGuid)).FirstOrDefault();
            var personDetails = ProfileDbContext.PersonDetails.Where(p => p.FinanceServiceGuid.Equals(personGuid)).FirstOrDefault();

            //*IMPORTANT--* As per suggestions from Vishal to Bharat (28/7/2014): in UnknownUser table we will store 'PersonId' & NOT 'PersonDetailID'

            //   AuthInfo authInfo = (ProfileDbContext.AuthInfoes.Where(a => a.Person.PersonGuid == personGuid && a.DomainId == DomainId)).FirstOrDefault();
            if (personDetails == null)
            {
                return(Request.CreateResponse(HttpStatusCode.NoContent, new HttpError(ErrorInfo.UserNotFound)));
            }
            try
            {
                result = AnonymousDBContext.AssignProfileID(fpuserid, personDetails.PersonId);
            }
            catch (Exception ex)
            {
                logger.ErrorException(ex.Message, ex);
            }
            return(Request.CreateResponse(HttpStatusCode.OK, new
            {
                FPUserID = result
            }));
        }
        public HttpResponseMessage UpdateProfileId(long fpuserid, long fpprofileId)
        {
            if (!IsEnableAnonymous)
            {
                return(Request.CreateResponse(HttpStatusCode.OK, new
                {
                    FPUserID = 0
                }));
            }
            var result = 0;

            try
            {
                result = AnonymousDBContext.AssignProfileID(fpuserid, fpprofileId);
            }
            catch (Exception ex)
            {
                logger.ErrorException(ex.Message, ex);
            }
            return(Request.CreateResponse(HttpStatusCode.OK, new
            {
                FPUserID = result
            }));
        }