Views without PK's

Posts   
 
    
Dale
User
Posts: 2
Joined: 26-Sep-2010
# Posted on: 27-Sep-2010 20:38:41   

I just upgraded to version 3 yesterday. I had been using 2.6 for some time. I'm upgrading a project.

I'm using SQL 2000, 2005, and 2008 for various projects I've been working on / maintaining for the years. I am about to start an upgrade of a project that is using SQL 2000, however my workstation has 2008 on it, so that's what I'm developing with.

I am not really stressing or making use of most of the great features llbl has to offer. Just trying to have a nice reliable data access layer to store and fetch data.

In my database, I have some views. Simple views. I have in the past brought in these views as typed views without issues. These are readonly objects for me. However, in the new version, I get an error message when generating, something to the effect of:

The typed view 'viewname' is mapped onto the target 'viewname', which is a view. A typed view..... aren't supported as the Entity Framework can't deal with types without a PK.

So, how do I bring in the views so I can use them?

Thanks.

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 28-Sep-2010 05:55:05   

Maybe you selected EntityFramework as the target platform (the first choice) and not LLBLGen Fraework. How did you upgrade the project btw?

David Elizondo | LLBLGen Support Team
Dale
User
Posts: 2
Joined: 26-Sep-2010
# Posted on: 28-Sep-2010 07:26:44   

I did select the entity framework 4. There aren't any real descriptions or explanations of what they entail, so I just chose framework 4 because it sounded like it related to .net 4.

I did not upgrade the project per se, I started a new one, pointed to my existing database and brought it in. Just trying to keep it simple.

Is the Entity Framework not compatible with views? Sounds kind of odd to me. But I'm not an expert in these areas, which is why I bought a robust package like this.

What should I do about the views?

After contemplating this a bit, and based on the comment about which framework I was trying to use, I found I could switch the framework, so I tried the one with LLBLGen Pro in the title. I was able to generate successfully.

Thanks for the help.