Have you made your Entity Class Properties public?
The scaffolding engine uses .NET reflection to look at the public properties exposed on the class passed it, and will add appropriate content based on each type it finds
The following works for me:
namespace Entities
{
public class Page
{
public virtual int Id { get; private set; }
public virtual string Name { get; set; }
public virtual string Title { get; set; }
public virtual string Description { get; set; }
}
}
public class PageMap : ClassMap<Page>
{
public PageMap()
{
Table("Pages");
Id(x => x.Id);
Map(x => x.Name);
Map(x => x.Keywords);
Map(x => x.Description);
}
}
Strongly Typed View: ticked
View Data Class: Entities.Page
View Content: List
Which then creates:
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IEnumerable<Entities.Page>>" %>
<table>
<tr>
<th></th>
<th>
Id
</th>
<th>
Name
</th>
<th>
Title
</th>
<th>
Description
</th>
</tr>
<% foreach (var item in Model) { %>
<tr>
<td>
<%= Html.ActionLink("Edit", "Edit", new { /* id=item.PrimaryKey */ }) %> |
<%= Html.ActionLink("Details", "Details", new { /* id=item.PrimaryKey */ })%> |
<%= Html.ActionLink("Delete", "Delete", new { /* id=item.PrimaryKey */ })%>
</td>
<td>
<%= Html.Encode(item.Id) %>
</td>
<td>
<%= Html.Encode(item.Name) %>
</td>
<td>
<%= Html.Encode(item.Title) %>
</td>
<td>
<%= Html.Encode(item.Description) %>
</td>
</tr>
<% } %>
</table>
<p>
<%= Html.ActionLink("Create New", "Create") %>
</p>