public ActionResult Index() { Roommates roommatesModel = new Roommates(); InitializeRoommates(roommatesModel); ChoreRequestModel chorerequest = new ChoreRequestModel(); chorerequest.roommates = roommatesModel; return View(chorerequest); }
public void InitializeRoommates(Roommates roommates) { for (int i = 0; i < 5; i++) { /* roommates.roomMates[i].Email = CloudConfigurationManager.GetSetting("EmailAddr_" + i); roommates.roomMates[i].Name = CloudConfigurationManager.GetSetting("Name_" + i); */ Roommate roommate = new Roommate(); roommate.Email = "*****@*****.**"; roommate.Name = "Jack"; roommates.roomMates[i] = roommate; } }