Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > Designer> Entity Framework Core v1
 

Pages: 1
Designer
Entity Framework Core v1
Page:1/1 

  Print all messages in this thread  
Poster Message
Puromtec
User



Location:
VA
Joined on:
22-Jun-2005 16:38:52
Posted:
76 posts
# Posted on: 30-Oct-2017 19:20:50.  
I am currently switching to use EF Core v1 and immediately ran into an issue with my existing mappings in which I have an entity mapped to a view in the database.

The designer posted the message:

Code:

"The entity 'QryOrderDetail' is mapped onto the target 'ImagineData.dbo.qryOrderDetail', which is a view. Entity Framework Core doesn't support views as mapping targets."


I am aware of this limitation in v1, and found this thread: https://github.com/aspnet/EntityFrameworkCore/issues/827

Is there a suggested path for me at this point within LLBL Gen Pro?

Thanks
  Top
Walaa
Support Team



Location:

Joined on:
21-Aug-2005 16:03:48
Posted:
14421 posts
# Posted on: 30-Oct-2017 23:11:01.  
A workaround is to use a copy of the schema the the designer is pointed to where you have a table with the same DDL of the view.
Thus tricking EF Core to have an entity, which it thinks is mapped to a table, while at runtime, it is actually mapped to a view.


  Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
37186 posts
# Posted on: 31-Oct-2017 09:47:35.  
... that could be a workaround indeed, if EF Core doesn't fetch the schema at startup. I don't know if it does, but if it does, you can't work around it.

I wonder why you go for EF Core v1 tho, as EF Core v2 is available too and .net core can be installed with the app side-by-side so I'd go for that over EF Core v1 in any case (not that it solves your problem). We also released a .NET Core compatible version of our runtime btw (in v5.3, which supports .netstandard 2.0 and thus .net core 2.0) and our runtime does support views, and many more features EF Core doesn't. Besides that, it's also faster and eats less memory, win win! Wink
Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
Puromtec
User



Location:
VA
Joined on:
22-Jun-2005 16:38:52
Posted:
76 posts
# Posted on: 31-Oct-2017 14:58:14.  
Thanks, my mistake, I need to upgrade to LLBL Gen Pro 5.3.

  Top
Puromtec
User



Location:
VA
Joined on:
22-Jun-2005 16:38:52
Posted:
76 posts
# Posted on: 03-Nov-2017 22:07:32.  
Walla, I actually did that to get it working.


Here is the awful set of steps.

1. Design Views with MS SQL view designer.
2. select into new table from view and save the ddl for the view to a file.
3. Reverse engineer inside LLBL Gen Designer.
4. Delete views and tables in db.
5. Generate code.
6. Create migration from new modelbuilder/entities.
7. Create empty migration and add drop table statements.
8. Create empty migration and add SQL for creating views.

Tested.

I'll try to follow what is upcoming in next version of Core v2. I'm not totally opposed to switching to LLBL Gen runtime framework, but I'm on EF for now. I like both.
  Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
37186 posts
# Posted on: 04-Nov-2017 07:56:52.  
THey said they'll add View support in v2.1. It's to be seen they'll make it tho (however, to this day it's unclear to me why on earth it's impossible for them to support views in the current version, it doesn't require any work at all!) .NET core 2.1 is scheduled for q2 next year.

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



Location:

Joined on:
10-Sep-2018 14:58:32
Posted:
1 posts
# Posted on: 10-Sep-2018 15:05:30.  
Hey guys
.Net Core 2.1 is now available and Microsoft supports views.
Is it now possible to use views in the Designer?
I'm using version 5.4.2 and can not find support right now.
  Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
37186 posts
# Posted on: 10-Sep-2018 16:15:23.  
Not yet. Will come in v5.5 (currently in development). EF Core 2.1 support is implemented at the moment, we're currently implementing the last workitems.



Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
Pages: 1  


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

Version: 2.1.12172008 Final.