In our next project we have a need for using interfaces like this (Example code)
public interface IFoo
{
string Name {get; set;}
IList<IBar> Bars {get; set;}
}
public interface IBar
{
string Name {get;set;}
IList<IFoo> Foos {get;set;
}
public class Foo : IFoo
{
public string Name {get; set;}
public IList<IBar> Bars {get; set;}
}
public class Bar : IBar
{
public string Name {get; set;}
public IList<IFoo> Foos {get;set;}
}
Obviously, in the application layer, we wish to be using the interfaces, and have no knowlegde what so ever about the implementing class.
I’ve been looking at a few OR/M’s – We currently own LLBLGen, I have tried EntityFramework and it was a nightmare, didn’t get it to work either, looked into NHibernate but the fact that the getting-started procedure is so complicated relative to LLBLGen scared me away (but I am still open for NHibernate if it supports my needs).
So, what I am looking for: A simple OR/M that I can use with minimal setup requirements (LLBLGen you just use their tool to reverse engineer your DB, and generate source code, and you can begin coding), which supports the structure above.
On a side note: Could anyone tell me what the pattern I am looking for is called? (other than ultra-slothfull 😉 )
1 Answer