Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > LLBLGen Pro Runtime Framework> LLBL 4.2 - TypedView
 

Pages: 1
LLBLGen Pro Runtime Framework
LLBL 4.2 - TypedView
Page:1/1 

  Print all messages in this thread  
Poster Message
ianvink
User



Location:

Joined on:
15-Dec-2006 02:36:45
Posted:
358 posts
# Posted on: 09-Jul-2014 06:01:03.  
Hi Guys,

Using EF 6 on SQL Server 2012 I get this error:

An exception of type 'System.InvalidOperationException' occurred in EntityFramework.dll but was not handled in user code

Additional information: The entity type PersonGridTypedViewRow is not part of the model for the current context.

Based on

Code:
         return _db.Set<PersonGridTypedViewRow>()
                .Where(p => p.NationId == User.NationId && p.IsBahai && p.DOD == null && p.LocalId == localId)
                .OrderBy(p => p.LastName);


where _db is the MYDataContext(); that LLBL generates.

This typed view is based on a table (Right click Reverse engineer to Typed View) There is no _db.GetPersonGridTypedView().

Strangely, there is no reference to the PersonGridTypedViewRow anywhere in the edmx or the code generated by LLBL

How do I get the TYpedViews to be queryable?
  Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
37237 posts
# Posted on: 09-Jul-2014 09:58:59.  
Where does PersonGridTypedViewRow come from? As typed views based on table/view aren't supported by LLBLGen Pro for EF5/6 as EF 5/6 requires these types to have a PK and a typed view doesn't have a PK.

Did you map the PersonGridTypedViewRow class on a TVF as well?


Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
ianvink
User



Location:

Joined on:
15-Dec-2006 02:36:45
Posted:
358 posts
# Posted on: 09-Jul-2014 16:59:51.  
That explains it, it was based on a table. I'll use a type list instead, it
S for a picker in a ui so I just need a few columns.

Typed list is probsbly more efficient too
  Top
Pages: 1  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.