public ActionResult Index() { CompleteProfile myProfile = (CompleteProfile)Session["myProfile"]; UserAccountView accountView = new UserAccountView(); accountView.IsThisMyOwnProfile = true; //accountView.WallOfThisProfile.Posts = new List<PostView>(); //accountView.WallOfThisProfile.Tweets = new List<TweetView>(); //accountView.WallOfThisProfile.Retweets = new List<RetweetView>(); CompleteProfileView completeProfile = new CompleteProfileView(); BasicProfileView basicProfile = new BasicProfileView(); completeProfile.BasicProfile = basicProfile; basicProfile.ReferenceKey = myProfile.BasicProfile.ReferenceKey.ToString(); basicProfile.AccountType = AccountType.UserAccount; completeProfile.FullName = myProfile.FullName; completeProfile.Description1 = myProfile.Description1; completeProfile.Description2 = myProfile.Description2; accountView.Profile = completeProfile; accountView.EmailOfThisProfile = User.Identity.Name; accountView.FoldersOfThisProfile = new Dictionary<string, string>(); accountView.WallOfThisProfile = new ContentStreamView(); accountView.WallOfThisProfile.Posts = new List<PostView>(); accountView.WallOfThisProfile.Tweets = new List<TweetView>(); accountView.WallOfThisProfile.Retweets = new List<RetweetView>(); accountView.WorkContactsOfThisProfile = Converters.ConvertFromViewModelToView(UserAccountService.GetWorkContactsOfUserAccountByKey( myProfile.BasicProfile.ReferenceKey.ToString() )); accountView.PartnershipContactsOfThisProfile =Converters.ConvertFromViewModelToView(UserAccountService.GetPartnershipContactsOfUserAccountByKey( myProfile.BasicProfile.ReferenceKey.ToString())); accountView.GroupsOfThisProfile = Converters.ConvertFromViewModelToView(UserAccountService.GetGroupsOfUserAccountByKey(myProfile.BasicProfile.ReferenceKey.ToString())); //Im the owner and the viewer of the wall var thisViewerKey = myProfile.BasicProfile.ReferenceKey.ToString(); ContentStreamViewModel wallRetrieved = PublishingService.GetContentStreamAsNewsfeed(thisViewerKey,thisViewerKey); CompleteProfileViewModel myOrganizationAccount = OrganizationAccountService.GetOrganizationAccountProfileByEmployeeUserAccountKey(thisViewerKey); accountView.OrganizationAccountOfThisProfile = new CompleteProfileView { BasicProfile = new BasicProfileView { ReferenceKey=myOrganizationAccount.BasicProfile.ReferenceKey, AccountType=myOrganizationAccount.BasicProfile.AccountType }, FullName=myOrganizationAccount.FullName, Description1=myOrganizationAccount.Description1 , Description2=myOrganizationAccount.Description2 }; // accountView.WallOfThisProfile = new ContentStreamView(); // accountView.WallOfThisProfile.Posts = new List<PostView>(); if (wallRetrieved.Posts.Count >0) { foreach (PostViewModel post in wallRetrieved.Posts) { PostView thisPost = new PostView(); thisPost.Key = post.Key; thisPost.Author = new CompleteProfileView { BasicProfile = new BasicProfileView { ReferenceKey=post.Author.BasicProfile.ReferenceKey , AccountType= post.Author.BasicProfile.AccountType }, FullName=post.Author.FullName, Description1= post.Author.Description1 , Description2= post.Author.Description2 }; thisPost.PublishDateTime = post.PublishDateTime; thisPost.Text = post.Text; thisPost.Likes = post.Likes; thisPost.ILikedIt = post.ILikedIt; thisPost.Comments = new List<CommentView>(); foreach (CommentViewModel comment in post.Comments) { CommentView thisComment = new CommentView(); thisComment.Key = comment.Key; thisComment.Author = new CompleteProfileView { BasicProfile = new BasicProfileView { ReferenceKey = comment.Author.BasicProfile.ReferenceKey, AccountType = comment.Author.BasicProfile.AccountType }, FullName = comment.Author.FullName, Description1 = comment.Author.Description1, Description2 = comment.Author.Description2 }; thisComment.Text = comment.Text; thisComment.PublishDateTime = comment.PublishDateTime; thisComment.Likes = comment.Likes; thisComment.ILikedIt = comment.ILikedIt; thisPost.Comments.Add(thisComment); } accountView.WallOfThisProfile.Posts.Add(thisPost); } } if (wallRetrieved.Tweets.Count > 0) { foreach (TweetViewModel tweet in wallRetrieved.Tweets) { TweetView thisTweet = new TweetView(); thisTweet.Key = tweet.Key; thisTweet.Text = tweet.Text; thisTweet.PublishDateTime = tweet.PublishDateTime; thisTweet.Author = new CompleteProfileView { BasicProfile = new BasicProfileView { ReferenceKey = tweet.Author.BasicProfile.ReferenceKey, AccountType = tweet.Author.BasicProfile.AccountType }, FullName = tweet.Author.FullName, Description1 = tweet.Author.Description1, Description2 = tweet.Author.Description2 }; accountView.WallOfThisProfile.Tweets.Add(thisTweet); } } if (wallRetrieved.Retweets.Count > 0) { foreach (RetweetViewModel retweet in wallRetrieved.Retweets) { RetweetView thisRetweet = new RetweetView(); thisRetweet.RetweetKey = retweet.RetweetKey; thisRetweet.TweetKey = retweet.TweetKey; thisRetweet.Text = retweet.Text; thisRetweet.PublishDateTime = retweet.PublishDateTime; thisRetweet.TweetPublishDateTime = retweet.TweetPublishDateTime.ToString(); thisRetweet.RetweetAuthor = new CompleteProfileView { BasicProfile = new BasicProfileView { ReferenceKey = retweet.RetweetAuthor.BasicProfile.ReferenceKey, AccountType = retweet.RetweetAuthor.BasicProfile.AccountType }, FullName = retweet.RetweetAuthor.FullName, Description1 = retweet.RetweetAuthor.Description1, Description2 = retweet.RetweetAuthor.Description2 }; thisRetweet.TweetAuthor = new CompleteProfileView { BasicProfile = new BasicProfileView { ReferenceKey = retweet.TweetAuthor.BasicProfile.ReferenceKey, AccountType = retweet.TweetAuthor.BasicProfile.AccountType }, FullName = retweet.TweetAuthor.FullName, Description1 = retweet.TweetAuthor.Description1, Description2 = retweet.TweetAuthor.Description2 }; accountView.WallOfThisProfile.Retweets.Add(thisRetweet); } } accountView.WallOfThisProfile.PublishedItems = new List<ISortingCapable>(); accountView.WallOfThisProfile.PublishedItems.AddRange(accountView.WallOfThisProfile.Posts); accountView.WallOfThisProfile.PublishedItems.AddRange(accountView.WallOfThisProfile.Tweets); accountView.WallOfThisProfile.PublishedItems.AddRange(accountView.WallOfThisProfile.Retweets); accountView.WallOfThisProfile.PublishedItems= accountView.WallOfThisProfile.PublishedItems.OrderByDescending(x => x.PublishDateTime).ToList(); CompleteProfileView groupView = new CompleteProfileView() { BasicProfile = new BasicProfileView() { ReferenceKey = "ACBCCE0E-7C9F-4386-99AA-1458F308EBB0", AccountType = AccountType.Group }, FullName = "Electric Providers Group" }; CompleteProfileView coworkerView = new CompleteProfileView() { BasicProfile = new BasicProfileView() { ReferenceKey = "BCBCCE0E-7C9F-4386-98AA-1458F308E205", AccountType = AccountType.UserAccount }, FullName = "Larry Page" }; CompleteProfileView partnerView = new CompleteProfileView() { BasicProfile = new BasicProfileView() { ReferenceKey = "BCBCCE0E-7C9F-4386-98AA-1458F308E203", AccountType = AccountType.UserAccount }, FullName = "Allie Opper" }; accountView.GroupSuggestion = groupView; accountView.PartnerSuggestion = partnerView; accountView.CoworkerSuggestion = coworkerView; return View("Newsfeed",accountView); }
public ActionResult Partnerships() { CompleteProfile myProfile = (CompleteProfile)Session["myProfile"]; OrganizationAccountViewModel accountRetrieved = OrganizationAccountService.GetOrganizationAccountByKey(myProfile.BasicProfile.ReferenceKey.ToString()); // List<PartnershipStateInfoViewModel> partnerships = OrganizationAccountService.GetAllPartnershipsByOrganizationAccountKey(accountRetrieved.Profile.BasicProfile.ReferenceKey); PartnershipsView partnershipsView = new PartnershipsView(); partnershipsView.AcceptedSisterDivisions = new List<CompleteProfileView>(); partnershipsView.AcceptedPartners = new List<CompleteProfileView>(); partnershipsView.RequestorSisterDivisions = new List<CompleteProfileView>(); partnershipsView.RequestorPartners = new List<CompleteProfileView>(); //partnershipsView.SisterDivisionSuggestion = new List<CompleteProfileView>(); //partnershipsView.PartnerSuggestion = new List<CompleteProfileView>(); //partnershipsView.AllianceSuggestion = new List<CompleteProfileView>(); List<PartnershipStateInfoViewModel> partnerships = OrganizationAccountService.GetAllPartnershipsByOrganizationAccountKey(accountRetrieved.Profile.BasicProfile.ReferenceKey); foreach (var partnership in partnerships) { CompleteProfileView profile = new CompleteProfileView(); if (partnership.PartnershipAction == PartnershipAction.Accept) { //am i the receiver? if (accountRetrieved.Profile.BasicProfile.ReferenceKey == partnership.Receiver.BasicProfile.ReferenceKey) { //is a coworker? if (myProfile.Description2 == partnership.Sender.Description2) { OrganizationViewModel organizationVM = OrganizationService.GetOrganizationByOrganizationAccountKey(partnership.Sender.BasicProfile.ReferenceKey); profile.BasicProfile = new BasicProfileView { ReferenceKey = partnership.Sender.BasicProfile.ReferenceKey, AccountType = AccountType.OrganizationAccount }; profile.FullName = partnership.Sender.FullName; profile.Description1 = partnership.Sender.Description1; profile.Description2 = organizationVM.Profile.FullName; partnershipsView.AcceptedSisterDivisions.Add(profile); } else { OrganizationViewModel organizationVM = OrganizationService.GetOrganizationByOrganizationAccountKey(partnership.Sender.BasicProfile.ReferenceKey); profile.BasicProfile = new BasicProfileView { ReferenceKey = partnership.Sender.BasicProfile.ReferenceKey, AccountType = AccountType.OrganizationAccount }; profile.FullName = partnership.Sender.FullName; profile.Description1 = partnership.Sender.Description1; profile.Description2 = organizationVM.Profile.FullName; partnershipsView.AcceptedPartners.Add(profile); } } else { //is a coworker? if (myProfile.Description2 == partnership.Receiver.Description2) { OrganizationViewModel organizationVM = OrganizationService.GetOrganizationByOrganizationAccountKey(partnership.Receiver.BasicProfile.ReferenceKey); profile.BasicProfile = new BasicProfileView { ReferenceKey = partnership.Receiver.BasicProfile.ReferenceKey, AccountType = AccountType.OrganizationAccount }; profile.FullName = partnership.Receiver.FullName; profile.Description1 = partnership.Receiver.Description1; profile.Description2 = organizationVM.Profile.FullName; partnershipsView.AcceptedSisterDivisions.Add(profile); } else { OrganizationViewModel organizationVM = OrganizationService.GetOrganizationByOrganizationAccountKey(partnership.Receiver.BasicProfile.ReferenceKey); profile.BasicProfile = new BasicProfileView { ReferenceKey = partnership.Receiver.BasicProfile.ReferenceKey, AccountType = AccountType.OrganizationAccount }; profile.FullName = partnership.Receiver.FullName; profile.Description1 = partnership.Receiver.Description1; profile.Description2 = organizationVM.Profile.FullName; partnershipsView.AcceptedPartners.Add(profile); } } } if (partnership.PartnershipAction == PartnershipAction.Request) { //am i the receiver? if (accountRetrieved.Profile.BasicProfile.ReferenceKey == partnership.Receiver.BasicProfile.ReferenceKey) { //is a coworker? if (myProfile.Description1 == partnership.Sender.Description1) { OrganizationViewModel organizationVM = OrganizationService.GetOrganizationByOrganizationAccountKey(partnership.Sender.BasicProfile.ReferenceKey); profile.BasicProfile = new BasicProfileView { ReferenceKey = partnership.Sender.BasicProfile.ReferenceKey, AccountType = AccountType.OrganizationAccount }; profile.FullName = partnership.Sender.FullName; profile.Description1 = partnership.Sender.Description1; profile.Description2 = organizationVM.Profile.FullName; partnershipsView.RequestorSisterDivisions.Add(profile); } else { OrganizationViewModel organizationVM = OrganizationService.GetOrganizationByOrganizationAccountKey(partnership.Sender.BasicProfile.ReferenceKey); profile.BasicProfile = new BasicProfileView { ReferenceKey = partnership.Sender.BasicProfile.ReferenceKey, AccountType = AccountType.OrganizationAccount }; profile.FullName = partnership.Sender.FullName; profile.Description1 = partnership.Sender.Description1; profile.Description2 = organizationVM.Profile.FullName; partnershipsView.RequestorPartners.Add(profile); } } else { //is a coworker? if (myProfile.Description2 == partnership.Receiver.Description2) { OrganizationViewModel organizationVM = OrganizationService.GetOrganizationByOrganizationAccountKey(partnership.Receiver.BasicProfile.ReferenceKey); profile.BasicProfile = new BasicProfileView { ReferenceKey = partnership.Receiver.BasicProfile.ReferenceKey, AccountType = AccountType.OrganizationAccount }; profile.FullName = partnership.Receiver.FullName; profile.Description1 = partnership.Receiver.Description1; profile.Description2 = organizationVM.Profile.FullName; partnershipsView.RequestorSisterDivisions.Add(profile); } else { OrganizationViewModel organizationVM = OrganizationService.GetOrganizationByOrganizationAccountKey(partnership.Receiver.BasicProfile.ReferenceKey); profile.BasicProfile = new BasicProfileView { ReferenceKey = partnership.Receiver.BasicProfile.ReferenceKey, AccountType = AccountType.OrganizationAccount }; profile.FullName = partnership.Receiver.FullName; profile.Description1 = partnership.Receiver.Description1; profile.Description2 = organizationVM.Profile.FullName; partnershipsView.RequestorPartners.Add(profile); } } } } return View(partnershipsView); }
public ActionResult Friendships() { CompleteProfile myProfile = (CompleteProfile)Session["myProfile"]; UserAccountViewModel accountRetrieved = UserAccountService.GetUserAccountByKey(myProfile.BasicProfile.ReferenceKey.ToString()); FriendshipsView friendshipsView = new FriendshipsView(); friendshipsView.AcceptedWorkContacts = new List<CompleteProfileView>(); friendshipsView.AcceptedPartnershipContacts = new List<CompleteProfileView>(); friendshipsView.RequestorWorkContacts = new List<CompleteProfileView>(); friendshipsView.RequestorPartnershipContacts = new List<CompleteProfileView>(); friendshipsView.WorkContactSuggestion = new List<CompleteProfileView>(); friendshipsView.PartnershipContactSuggestion = new List<CompleteProfileView>(); friendshipsView.GroupSuggestion = new List<CompleteProfileView>(); List<FriendshipStateInfoViewModel> friendships = UserAccountService.GetAllFriendshipsByUserAccountKey(accountRetrieved.Profile.BasicProfile.ReferenceKey ); foreach (var friendship in friendships) { CompleteProfileView profile = new CompleteProfileView(); if (friendship.FriendshipAction == FriendshipAction.Accept) { //am i the receiver? if (accountRetrieved.Profile.BasicProfile.ReferenceKey == friendship.Receiver.BasicProfile.ReferenceKey) { //is a coworker? if (myProfile.Description1 == friendship.Sender.Description1) { OrganizationAccountViewModel organizationAccountVM = OrganizationAccountService.GetOrganizationAccountByUserAccountKey(friendship.Sender.BasicProfile.ReferenceKey ); profile.BasicProfile = new BasicProfileView { ReferenceKey = friendship.Sender.BasicProfile.ReferenceKey, AccountType=AccountType.UserAccount }; profile.FullName = friendship.Sender.FullName; profile.Description1 = organizationAccountVM.Profile.FullName ; profile.Description2 = organizationAccountVM.Organization.FullName; friendshipsView.AcceptedWorkContacts.Add(profile); } else { OrganizationAccountViewModel organizationAccountVM = OrganizationAccountService.GetOrganizationAccountByUserAccountKey(friendship.Sender.BasicProfile.ReferenceKey); profile.BasicProfile = new BasicProfileView { ReferenceKey = friendship.Sender.BasicProfile.ReferenceKey, AccountType = AccountType.UserAccount }; profile.FullName = friendship.Sender.FullName; profile.Description1 = organizationAccountVM.Profile.FullName ; profile.Description2 = organizationAccountVM.Organization.FullName; friendshipsView.AcceptedPartnershipContacts.Add(profile); } } else { //is a coworker? if (myProfile.Description1 == friendship.Receiver.Description1) { OrganizationAccountViewModel organizationAccountVM = OrganizationAccountService.GetOrganizationAccountByUserAccountKey(friendship.Receiver.BasicProfile.ReferenceKey); profile.BasicProfile = new BasicProfileView { ReferenceKey=friendship.Receiver.BasicProfile.ReferenceKey , AccountType= AccountType.UserAccount }; profile.FullName = friendship.Receiver.FullName; profile.Description1 = organizationAccountVM.Profile.FullName ; profile.Description2 = organizationAccountVM.Organization.FullName ; friendshipsView.AcceptedWorkContacts.Add(profile); } else { OrganizationAccountViewModel organizationAccountVM = OrganizationAccountService.GetOrganizationAccountByUserAccountKey(friendship.Sender.BasicProfile.ReferenceKey); profile.BasicProfile = new BasicProfileView { ReferenceKey = friendship.Receiver.BasicProfile.ReferenceKey, AccountType = AccountType.UserAccount }; profile.FullName = friendship.Receiver.FullName; profile.Description1 = organizationAccountVM.Profile.FullName ; profile.Description2 = organizationAccountVM.Organization.FullName ; friendshipsView.AcceptedPartnershipContacts.Add(profile); } } } if(friendship.FriendshipAction== FriendshipAction.Request) { //am i the receiver? if (accountRetrieved.Profile.BasicProfile.ReferenceKey == friendship.Receiver.BasicProfile.ReferenceKey) { //is a coworker? if (myProfile.Description1 == friendship.Sender.Description1) { OrganizationAccountViewModel organizationAccountVM = OrganizationAccountService.GetOrganizationAccountByUserAccountKey(friendship.Sender.BasicProfile.ReferenceKey); profile.BasicProfile = new BasicProfileView { ReferenceKey = friendship.Sender.BasicProfile.ReferenceKey, AccountType = AccountType.UserAccount }; profile.FullName = friendship.Sender.FullName; profile.Description1 = organizationAccountVM.Profile.FullName ; profile.Description2 = organizationAccountVM.Organization.FullName ; friendshipsView.RequestorWorkContacts.Add(profile); } else { OrganizationAccountViewModel organizationAccountVM = OrganizationAccountService.GetOrganizationAccountByUserAccountKey(friendship.Sender.BasicProfile.ReferenceKey); profile.BasicProfile = new BasicProfileView { ReferenceKey = friendship.Sender.BasicProfile.ReferenceKey, AccountType = AccountType.UserAccount }; profile.FullName = friendship.Sender.FullName; profile.Description1 = organizationAccountVM.Profile.FullName ; profile.Description2 = organizationAccountVM.Organization.FullName ; friendshipsView.RequestorPartnershipContacts.Add(profile); } } else { //is a coworker? if (myProfile.Description1 == friendship.Receiver.Description1) { OrganizationAccountViewModel organizationAccountVM = OrganizationAccountService.GetOrganizationAccountByUserAccountKey(friendship.Receiver.BasicProfile.ReferenceKey); profile.BasicProfile = new BasicProfileView { ReferenceKey = friendship.Receiver.BasicProfile.ReferenceKey, AccountType = AccountType.UserAccount }; profile.FullName = friendship.Receiver.FullName; profile.Description1 = organizationAccountVM.Profile.FullName ; profile.Description2 = organizationAccountVM.Organization.FullName ; friendshipsView.RequestorWorkContacts.Add(profile); } else { OrganizationAccountViewModel organizationAccountVM = OrganizationAccountService.GetOrganizationAccountByUserAccountKey(friendship.Receiver.BasicProfile.ReferenceKey); profile.BasicProfile = new BasicProfileView { ReferenceKey = friendship.Receiver.BasicProfile.ReferenceKey, AccountType = AccountType.UserAccount }; profile.FullName = friendship.Receiver.FullName; profile.Description1 = organizationAccountVM.Profile.FullName ; profile.Description2 = organizationAccountVM.Organization.FullName ; friendshipsView.RequestorPartnershipContacts.Add(profile); } } } } return View(friendshipsView); }
public ActionResult Index() { CompleteProfile myProfile = (CompleteProfile) Session["myProfile"]; //OrganizationServiceFacade organizationService = new OrganizationServiceFacade(new OrganizationServiceProxy()); //Dictionary<String, String> organizationAccountsFound = _organizationAccountServiceFacade.GetAllOrganizationAccounts(); //OrganizationAccountsView organizationAccountsView = new OrganizationAccountsView(); //organizationAccountsView.OrganizationAccounts = organizationAccountsFound; //return View(organizationAccountsView); //OrganizationServiceFacade organizationService = new OrganizationServiceFacade(new OrganizationServiceProxy()); //"BCBCCE0E-7C9F-4386-98AA-1458F308E1C3" OrganizationAccountViewModel organizationAccountRetrieved = OrganizationAccountService.GetOrganizationAccountByKey(myProfile.BasicProfile.ReferenceKey.ToString()); OrganizationAccountView organizationAccountView = new OrganizationAccountView(); CompleteProfileView completeProfile = new CompleteProfileView { BasicProfile = new BasicProfileView { ReferenceKey=myProfile.BasicProfile.ReferenceKey.ToString(), AccountType=myProfile.BasicProfile.ReferenceType }, FullName=myProfile.FullName, Description1=myProfile.Description1 }; organizationAccountView.Profile = completeProfile; organizationAccountView.Email = organizationAccountRetrieved.Email; organizationAccountView.IsThisMyOwnProfile = true; organizationAccountView.EmployeesOfThisProfile = Converters.ConvertFromViewModelToView(OrganizationAccountService.GetEmployeesOfOrganizationAccountByKey(organizationAccountRetrieved.Profile.BasicProfile.ReferenceKey)); organizationAccountView.SisterDivisionsOfThisProfile = Converters.ConvertFromViewModelToView(OrganizationAccountService.GetSisterDivisionsOfOrganizationAccountByKey(organizationAccountRetrieved.Profile.BasicProfile.ReferenceKey)); organizationAccountView.PartnersOfThisProfile = Converters.ConvertFromViewModelToView(OrganizationAccountService.GetPartnersOfOrganizationAccountByKey(organizationAccountRetrieved.Profile.BasicProfile.ReferenceKey)); organizationAccountView.AlliancesOfThisProfile = Converters.ConvertFromViewModelToView(OrganizationAccountService.GetAlliancesOfOrganizationAccountByKey(organizationAccountRetrieved.Profile.BasicProfile.ReferenceKey)); organizationAccountView.MyGeoLocation = new GeoLocationView { Latitude=organizationAccountRetrieved.Location.Latitude , Longitude=organizationAccountRetrieved.Location.Longitude }; organizationAccountView.WallOfThisProfile = new ContentStreamView(); organizationAccountView.WallOfThisProfile.Posts = new List<PostView>(); var thisViewerKey = myProfile.BasicProfile.ReferenceKey.ToString(); ContentStreamViewModel wallRetrieved = PublishingService.GetContentStreamByOwnerReferenceKey(thisViewerKey, thisViewerKey); if (wallRetrieved.Posts.Count > 0) { foreach (PostViewModel post in wallRetrieved.Posts) { PostView thisPost = new PostView(); thisPost.Key = post.Key; thisPost.Author = new CompleteProfileView { BasicProfile = new BasicProfileView { ReferenceKey = post.Author.BasicProfile.ReferenceKey, AccountType = post.Author.BasicProfile.AccountType }, FullName = post.Author.FullName, Description1 = post.Author.Description1, Description2 = post.Author.Description2 }; thisPost.TimeStamp = post.TimeStamp.ToString(); thisPost.Text = post.Text; thisPost.Likes = post.Likes; thisPost.ILikedIt = post.ILikedIt; thisPost.Comments = new List<CommentView>(); foreach (CommentViewModel comment in post.Comments) { CommentView thisComment = new CommentView(); thisComment.Key = comment.Key; thisComment.Author = new CompleteProfileView { BasicProfile = new BasicProfileView { ReferenceKey = comment.Author.BasicProfile.ReferenceKey, AccountType = comment.Author.BasicProfile.AccountType }, FullName = comment.Author.FullName, Description1 = comment.Author.Description1, Description2 = comment.Author.Description2 }; thisComment.Text = comment.Text; thisComment.ILikedIt = comment.ILikedIt; thisComment.TimeStamp = comment.TimeStamp.ToString(); thisComment.Likes = comment.Likes; thisPost.Comments.Add(thisComment); } organizationAccountView.WallOfThisProfile.Posts.Add(thisPost); } } Dictionary<string, string> coordinates = new Dictionary<string, string>(); coordinates.Add("Partner1", "47.548807,7.587820"); coordinates.Add("Partner2", "46.948432,7.440461"); coordinates.Add("Partner3", "46.519595,6.632335"); return View("OrganizationAccount",organizationAccountView); }