<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<List<GeekSpeakMVCDemo.Data.Person>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	PeopleAddress
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>People with Addresses</h2>

	
	<% foreach (var person in Model) { %>
		<%= person.FirstName %>
		<%= person.LastName %>
		<br>
		<% if (person.Addresses != null) { 
		 	foreach(var address in person.Addresses) { %>
			 
			 <%= address.Street %><br>
			 <%= address.City %>,
			 <%= address.State %>
			 <%= address.Zip %><br>

		<% } } %>
		<br>
		
	<% } %>

</asp:Content>
