Views as Entites?

Posts   
 
    
Ren
User
Posts: 42
Joined: 01-Jul-2005
# Posted on: 14-Jul-2005 01:14:36   

It looks like access to some databases is going to be restricted to views only in the future where I work. Is there a way to tell LLBL to see a view as an entity?

I am fairly new to LLBL and I see that I can build typed views that return a DataTable. But I really would not want to have to go through the DataTable and map the cells to properites on an Entity. I might as well be creating the DAL myself.

Is there anyway to make this work? I am a bit concerned about the non-ability to map directly to tables and work with the objects and EntityCollections.

Our applications are primarily web apps that I explained would be accessing the tables via a least privileged user, and the whole sql injection thing was talked about. The background of the folks here are report writers and non OOP thinking folks. So I have a difficult time getting objects and OR mapping through sometimes.

I need a good way to explain how accessing tables is not that bad, especially from an application using O/R mapping. Has anyone else had to face similar circumstances?

Thanks Ren

Fishy avatar
Fishy
User
Posts: 392
Joined: 15-Apr-2004
# Posted on: 14-Jul-2005 01:52:28   

Yes, as of v1.0.2004.2, you can map entities on views.

Check the documentation under: Designer - Adding and editing entities

Benno
User
Posts: 3
Joined: 12-Aug-2005
# Posted on: 12-Aug-2005 14:26:00   

Hi Fishy !

I am also trying to map entities to a database view...

I read the section you suggested several times as well as others and also tried all of the options I could find in the tool... and I cannot seem to get it to work...?!

Basically, I have a view that obtains data from another SQL Server database (catalog) and I would like create a relation of some kind between that database view and an entity column from within LLBLGen and generate the code so it appears transparent to the business layer...

And I cannot seem to be able to achieve that...

Any help greatly appreciated ! simple_smile

Thank you,

Ben

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39749
Joined: 17-Aug-2003
# Posted on: 12-Aug-2005 15:21:25   

What exactly is it that you fail to achieve at this point: the entity mapping on a view, or the relation creation? Does the view show up in the list of views when you select 'Add new entities mapped on views from catalogs' ?

Frans Bouma | Lead developer LLBLGen Pro