public ProfileModel getProfileModel(string userID)
        {
            int numberPostUser                = postDao.getNumberPostUser(userID);
            int numberUserFollow              = relationShipDao.getNumberUserFollow(userID);
            int numberRelationship            = relationShipDao.getNumberRelationship(userID);
            UserProfileModel userProfileModel = getUser(userID);

            ProfileModel profileModel = new ProfileModel()
            {
                NumberPostUser     = numberPostUser,
                NumberUserFollow   = numberUserFollow,
                NumberRelationship = numberRelationship,
                UserProfileModel   = userProfileModel,
            };

            return(profileModel);
        }
示例#2
0
        public ProfileModel getProfileModel(string userID, string loginUserId)
        {
            int numberPostUser                  = postDao.getNumberPostUser(userID);
            int numberUserFollow                = relationShipDao.getNumberUserFollow(userID);
            int numberRelationship              = relationShipDao.getNumberRelationship(userID);
            UserProfileModel userProfileModel   = getUser(userID);
            string           relationshipStatus = relationShipDao.getRelationship(loginUserId, userID);

            userProfileModel.RelationshipStatus = relationshipStatus;

            List <PostProfileModel> listPostProfileModel = getCurrentPost(userID);

            ProfileModel profileModel = new ProfileModel()
            {
                NumberPostUser     = numberPostUser,
                NumberUserFollow   = numberUserFollow,
                NumberRelationship = numberRelationship,
                UserProfileModel   = userProfileModel,
                GetcurrentPost     = listPostProfileModel,
            };

            return(profileModel);
        }