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); }
public string getRelationship(string userId, string friendId) { return(relationshipDao.getRelationship(userId, friendId)); }