Has anyone succeeded (or tried and failed) in using a Wrapper design pattern to implement LLBL? In this approach, the proprietary business entities would wrap (contain) the LLBL entities rather than inherit from them.
Ideally, the proprietary business entities and the LLBL entities would reside in separate assemblies too.
It looks to me like this is not possible with the current architecture. For example, in SetRelatedEntityProperty, the generated code expects to be able to cast the IEntityCore entity to it's LLBL entity type. This is expected to be either the entity itself or a class derived from the entity. However, if it is a class containing the entity (wrapper), this cast fails.
public override void SetRelatedEntityProperty(string propertyName, IEntityCore entity)
this.Person = (PersonEntity)entity;
One solution would be to use an explicit conversion operator in C#, but this doesn't seem possible if the 2 classes are in different assemblies with the LLBL assembly not knowing about the proprietary biz ent assembly (both referencing each other would create a circular ref).
Any comments or ideas are appreciated. Thanks!