public HttpResponseMessage GetPublicProfileTotalCount(string handle)
        {
            ItemResponse <StatTracker> response = new ItemResponse <StatTracker>();
            Account acc = _accountService.GetAccountByHandle(handle);

            if (acc != null)
            {
                response.Item = _statTrackerService.GetFollowerCount(acc.UserId);
            }

            return(Request.CreateResponse(HttpStatusCode.OK, response));
        }
        public HttpResponseMessage InsertCurrentByHandle(string handle, FollowerRequest data)
        {
            BaseResponse response = null;

            try
            {
                if (ModelState.IsValid)
                {
                    IdentityUser user       = _userService.GetCurrentUser();
                    Account      followedLG = _accountSrv.GetAccountByHandle(handle);
                    if (followedLG != null)
                    {
                        FollowNewsletter nwsInfo = new FollowNewsletter();
                        nwsInfo.Email   = user.Email;
                        nwsInfo.Handle  = handle;
                        data.FollowerID = user.Id;
                        data.ProfileUID = followedLG.UserId;


                        _followerSevice.Insert(data, nwsInfo);
                        response = new SuccessResponse();
                        return(Request.CreateResponse(HttpStatusCode.OK, response));
                    }
                    else
                    {
                        throw new Exception("Account does not exist");
                    }
                }
                else
                {
                    return(Request.CreateResponse(HttpStatusCode.InternalServerError, ModelState));
                }
            }
            catch (Exception ex)
            {
                response = new ErrorResponse(ex.Message);
                return(Request.CreateResponse(HttpStatusCode.InternalServerError, response));
            }
        }
        public HttpResponseMessage GetHandle(string handle)
        {
            ItemResponse <Account> response = new ItemResponse <Account>();

            response.Item = _accountsService.GetAccountByHandle(handle);

            if (response.Item == null)
            {
                return(Request.CreateResponse(HttpStatusCode.NotFound, response));
            }

            return(Request.CreateResponse(HttpStatusCode.OK, response));
        }
        // GET: LashProfile
        public ActionResult LashProfile(string handle)
        {
            _acc = _accountService.GetAccountByHandle(handle);

            Domain.UserProfile user = _userRoleService.GetUserByHandle(handle);

            if ((user == null || user.LockoutEnabled) || (user.AccountModifier != 1 && user.AccountModifier != 2))
            {
                return(RedirectToAction("InvalidUser"));
            }

            ItemViewModel <string> model = GetViewModel <ItemViewModel <string> >();

            if (_acc != null)
            {
                _entityId = handle;
            }

            model.Item = handle;

            return(View(model));
        }