private void CreateExtraProfiles() { var profileRepo = new ProfileRepository(); for (int i = 0; i < ProfileIds.Count; i++) { var profile = new Profile { AccountName = AccountIds[i], ProfileName = ProfileIds[i], Locations = new List<Location> { new Location(LocationBendName), new Location(LocationPortland) }, SportsPlayed = new List<SportWithSkillLevel> { new SportWithSkillLevel { Name = SoccerName, SkillLevel = new SkillLevel(2) }, new SportWithSkillLevel { Name = Basketballname, SkillLevel = new SkillLevel(7) }, new SportWithSkillLevel { Name = FootballName, SkillLevel = new SkillLevel(5) } } }; profileRepo.Save(profile); } }
public ActionResult FriendList() { var friends = new ProfileRepository().GetFriendsProfileNameList(GetProfileFromCookie()); var model = new FriendsListModel {FriendsProfileIds = friends}; return View(model); }
public Profile CreateProfileForAccount2() { var profileRepo = new ProfileRepository(); var profile = new Profile { AccountName = "*****@*****.**", ProfileName = Profile2Id, Locations = new List<Location> { new Location(LocationBendName), new Location(LocationPortland) }, SportsPlayed = new List<SportWithSkillLevel> {new SportWithSkillLevel { Name = SoccerName, SkillLevel = new SkillLevel(5) }, new SportWithSkillLevel { Name = Basketballname, SkillLevel = new SkillLevel(5) }} }; profileRepo.Save(profile); return profile; }
public Profile CreateProfileForAccount1() { var profileRepo = new ProfileRepository(); var profile = new Profile { AccountName = "*****@*****.**", ProfileName = Profile1Id, Locations = new List<Location> { new Location(LocationBendName) }, SportsPlayed = new List<SportWithSkillLevel> {new SportWithSkillLevel { Name = Basketballname, SkillLevel = new SkillLevel(3) }} }; profileRepo.Save(profile); return profile; }
public void CreateFriendshipForProfile1And2() { var profileRepo = new ProfileRepository(); profileRepo.AddFriendToProfile(Profile1Id, Profile2Id); }
public void SetUp() { SqlServerDataHelper.DeleteAllData(); _repo = new ProfileRepository(); }
private IList<Location> GetLocationsForProfile(string profileId) { var repo = new ProfileRepository(); var profile = repo.GetByProfileId(profileId); return profile.Locations; }