This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using NUnit.Framework; | |
using Web.Infrastructure; | |
using Core; | |
namespace Test | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Db4objects.Db4o; | |
using System.Linq; | |
using Db4objects.Db4o.Linq; | |
using System.Web; | |
using System.IO; | |
using System; | |
using System.Collections.Generic; | |
namespace Web.Infrastructure { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MvcApplication : NinjectHttpApplication | |
{ | |
public static DB db = new DB("server=(local);password=;options=none;"); | |
private static void openSession() | |
{ | |
if (File.Exists(@"c:\temp\db\iSay.eq")) { | |
db.OpenDatabase("iSay"); | |
db.RegisterType(typeof(iSay.Story)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using NHibernate; | |
using NHibernate.Cfg; | |
using NHibernate.Tool.hbm2ddl; | |
using Concepts.Core; | |
namespace Concepts.Tasks | |
{ | |
class Program | |
{ | |
public static void createDatabase() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" ?> | |
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" | |
assembly="Concepts.Core" | |
namespace="Concepts.Core"> | |
<class name="PersonAddress"> | |
<id name ="Id"> | |
<generator class="guid.comb"></generator> | |
</id> | |
<property name="Remark"></property> | |
<property name="IsPostal"></property> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Iesi.Collections.Generic; | |
namespace Concepts.Core | |
{ | |
public class Address : Entity | |
{ | |
public virtual string StreetName { get; set; } | |
public virtual string StreetNumber { get; set; } | |
public virtual string PostcalCode { get; set; } | |
public virtual string City { get; set; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Concepts.Web.Controllers | |
{ | |
public class HomeController : Controller | |
{ | |
private IPersonRepository _repo; | |
public HomeController(IPersonRepository repository) | |
{ | |
_repo = repository; | |
} | |
[TransactionFilter] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Ninject; | |
using Ninject.Web.Mvc; | |
using System.Reflection; | |
using NHibernate; | |
using NHibernate.Context; | |
using NHibernate.Cfg; | |
using System.IO; | |
using HibernatingRhinos.Profiler.Appender.NHibernate; | |
namespace Concepts.Web |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" ?> | |
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" | |
assembly="Concepts.Core" | |
namespace="Concepts.Core"> | |
<class name="Person"> | |
<id name ="Id"> | |
<generator class="guid.comb"></generator> | |
</id> | |
<property name="GivenName"></property> | |
<property name="SurName"></property> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Concepts.Core | |
{ | |
public class PersonAddress : Entity | |
{ | |
public virtual Person Person { get; set; } | |
public virtual Address Address { get; set; } | |
public virtual string Remark { get; set; } | |
public virtual bool IsPostal { get; set; } | |
public virtual DateTime? ValidFrom { get; set; } | |
public virtual DateTime? ValidTo { get; set; } |