What is a good example of a domain for NHibernate presentation?

I am trying to build a presentation for my local .NET user group in NHibernate. I want to demonstrate how you can convert an existing level of application data access to use NHibernate, but first I need a conversion application.

What would be a good example of a domain that would allow me to demonstrate the basic functions of ORM? This should be simple enough for listeners to understand, but include things like an inherited class or two to show how NHibernate handles this.

Current ideas:

  • Blog - not used, no obvious inheritance relationship?
  • Auction page - used by NHibernate in Action - you will need to rewrite DAL to use stored procedures through ADO to demonstrate conversion
  • Online store

Any ideas?

+3
source share
6 answers

How about a company address book application? Peoplehave obvious properties, and ContactLists- a set of People. Peoplehave Addresses. The call is ContactListclearly impossible; however, sending messages to a person and sending to ContactListmust have the same open API for SmtpClient.

In this example, you can illustrate:

  • basic mapping (i.e. FirstName, etc.)
  • (, First, Middle, Last Nickname Name)
  • Has-One ( ) (.. PersonAddress)
  • -- (.. ContactListPerson)
  • ( )
+3

Northwind .

, , Sh # rpArchitecture
( Northwind).

, - NHibernate.

+3

: http://code.google.com/p/ndddsample/, Driven Design #, NHibernate

+2

- - , , , , . , .

. , . - NHibernate - , .

+1

, , - /, , "" , . , , .

You will obviously have your own base class of vehicles, but you can start building different types of vehicles with it (car, truck, soup, etc.), and then further (car-> coupe, sedan,> semi- cabin, royal cabin, etc.)

+1
source

I second @ ddc0660, and here is a potential fragment of such a construction using the "contact point template" from the book: " Work with building objects that work .

+1
source

Source: https://habr.com/ru/post/1716464/


All Articles