Author: mat106 | Posted on: 12/23/2008 5:25:59 AM | Views : 385

I'm trying to get my head around DI/IoC, NHibernate and getting them to work nicely together for an application that i'm developing.  I'm quite new to both NHibernate and DI/IoC so not quite sure whether what i'm doing is the sensible way to be going about it. This is the scenario:The application provides users with the ability to calculate a particular value (known as the margin) for a particular financial transaction. The calculation of the marging value for each transaction is carried out by concrete implementations of an abstract MarginCalculator class and the concrete implementation to be used depends on the type of the product for the particular transaction (given by a certain field of the product object). The concrete calculator class is accessed via a property on the product class. i.e.public class Transaction{    private double _margin;    private Product _product;    private Client _client;        public double Margin { get; }    pu ...

Go to the complete details ...