I'm using the repository pattern explained here, in a Console application (just to get the feeling of how it works) and is seems i make some fundamental error.
I'm using Unity to initialize the IoC like this:
var container = new UnityContainer();
container
.RegisterType<Abstract.IUnitOfWork, Concrete.UnitOfWork>()
.RegisterType<Abstract.IDatabaseFactory, Concrete.DatabaseFactory>( );
I noticed that the DatabaseFactory returns always a Database which is in a disconnected state..is that right? (I 'm focusing on using this later in a WPF application!)
I'm sure i'm missing something....