1 This sample illustrates some more complex usages of ActiveRecord within MonoRail.
\r
6 First of all edit the web.config to use your database:
\r
8 <add key="hibernate.connection.driver_class" value="NHibernate.Driver.SqlClientDriver" />
\r
9 <add key="hibernate.dialect" value="NHibernate.Dialect.MsSql2000Dialect" />
\r
10 <add key="hibernate.connection.provider" value="NHibernate.Connection.DriverConnectionProvider" />
\r
11 <add key="hibernate.connection.connection_string" value="Data Source=.;Initial Catalog=test;Integrated Security=SSPI" />
\r
13 Or if you have MS SQL Server create a 'test' Database.
\r
15 Then create the required schema. Check the file
\r
17 BinderSample.Web\schema.sql
\r
20 Running with Cassini
\r
21 ====================
\r
23 With cassini it's easy to run and debug the application. Execute:
\r
25 > CassiniWebServer.exe <full path to>\BinderSample.Web 83 /
\r
27 Then point your browser to
\r
29 http://localhost:83/
\r
35 Create some publishers and books using Scaffolding to start:
\r
37 http://localhost:83/scaffolding/index.rails
\r
39 Then you can visualize different approaches to edit a publisher and it's books
\r
41 * http://localhost/approach1/index.rails
\r
42 which uses pure arrays
\r
46 * http://localhost/approach2/index.rails
\r
47 which uses DataBind and arrays (less effort)
\r
51 * http://localhost/approach3/index.rails
\r
52 which uses ARDataBind (much less effort)
\r