Hi!
Few months ago I tried to change the way Presentation Layer deals with entity objects and entity collections by exposing them as interfaces (http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=1664).
By doing that I got for example (speaking in Northwind terms):
public class OrderEntity : EntityBase2, IOrderEntity, ...
{
...
// Properties
public IList Orders // (IList instead of EntityCollection)
{
... // Exactly same implementation as in original template.
}
public ICustomerEntity Customer // (ICustomerEntity instead of CustomerEntity)
{
... // Exactly same implementation as in original template.
}
...
}
public interface IOrderEntity
{
IList Orders
{
get;
set;
}
ICustomerEntity Customer
{
get;
set;
}
...
}
But I ran into some problems while doing recursive save which failed on one to many relations. I tried to figure out what was going on, but eventually I gave up on it (well, it seemed until now ).
I wonder if anyone has tried anything like that? Will it be possible in new version of LLBLGen Pro?
Vladimir