DataSourceObject and Custom Business Layer

Posts   
 
    
JeffV
User
Posts: 4
Joined: 07-Aug-2006
# Posted on: 07-Aug-2006 19:46:34   

I am very interested in using the LLBLGenProDataSource object. We typically don't allow UI references to the (LLBLGenPro) data layer. Is there a way to use/pass through the Entity Collections, Typed Views, etc. up through a custom business layer to the UI?

I hope to accomplish: * Not having a direct UI link to the LLBL layer * Being able to add business logic to the automatic 2-way data-bound transactions

We are using .Net 2.0 and LLBLGenPro 2.0.

Is this possible? Are there any references you can point me to? simple_smile

Thanks, Jeff

pilotboba
User
Posts: 434
Joined: 05-Aug-2005
# Posted on: 07-Aug-2006 21:00:27   

JeffV wrote:

I am very interested in using the LLBLGenProDataSource object. We typically don't allow UI references to the (LLBLGenPro) data layer. Is there a way to use/pass through the Entity Collections, Typed Views, etc. up through a custom business layer to the UI?

You can do this unless you reference the DLL that contains the entity/collection objects. What you can do is create Manager classes that parse the entity into some other type of class (dataset, array?) or custom DTO. But, seems like alot of extra work for no gain to me.

Your domain model should be accesable by your UI layer.

BOb

psandler
User
Posts: 540
Joined: 22-Feb-2005
# Posted on: 07-Aug-2006 21:12:26   

I assume you mean that you want to write a layer in between the generated code and your UI? So you would have a function in another layer called (for example) FetchCustomerEntity that you would call from the UI, as opposed to writing the FetchCustomerEntity method in your code behind?

I ask because it almost sounds like you are asking if you can use the LLBLDataSource object while your UI has no knowledge of the LLBL data layer, which is, of course, impossible.

Assuming you meant the former, look in the Databinding and Gui controls forum, or search for "livepersistance false". There is also a really sweet example posted here:

http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=6975&HighLight=1

wink

JeffV
User
Posts: 4
Joined: 07-Aug-2006
# Posted on: 07-Aug-2006 21:57:24   

Thank you both. psandler, your example looks like it will get me going quite nicely. Thanks, again.