Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > Designer> Many to Many in EF Core Models
 

Pages: 1
Designer
Many to Many in EF Core Models
Page:1/1 

  Print all messages in this thread  
Poster Message
rstrahl
User



Location:
Hood River, Oregon
Joined on:
24-Aug-2009 06:47:54
Posted:
17 posts
# Posted on: 17-Sep-2019 21:16:31.  

I noticed that the model import from db does not support many to many imports for EF Core. While there's no single table mapping support, it's certainly possible to use link table mapping for M:M relationships.

Wouldn't that be an option for output generation and support of M:M.

I presume that can be done manually if necessary as long as the model editor can preserve those extra tables when resyncing from the db?

Otherwise what's the best approach you'd suggest with EF Core?


+++ Rick ---
  Top
daelmo
Support Team



Location:
Guatemala City
Joined on:
28-Nov-2005 23:35:24
Posted:
8150 posts
# Posted on: 18-Sep-2019 09:03:57.  
rstrahl wrote:

I noticed that the model import from db does not support many to many imports for EF Core.

Yes, many to many relationships is not supported.

rstrahl wrote:
While there's no single table mapping support, it's certainly possible to use link table mapping for M:M relationships.

What do you mean by "link table mapping for M:M relationships"?

rstrahl wrote:
I presume that can be done manually if necessary as long as the model editor can preserve those extra tables when resyncing from the db?

Otherwise what's the best approach you'd suggest with EF Core?

Actually, manually is the way MS recommend to treat m:n. See this: https://docs.microsoft.com/en-us/ef/core/modeling/relationships#many-to-many


David Elizondo
LLBLGen'ing (articles and code snippets) | linkedin | twitter
 
Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
38097 posts
# Posted on: 18-Sep-2019 09:22:51.  
yeah that 2 x m:1 is supported of course, it's just not creating another m:n between the two entities related to each other, in that example: post and tag. There's no way to specify in EF Core today that post and tag have a m:n relationship and you can utilize that to fetch them, e.g. fetch a post and all its tags using the m:n relationship like you can in our own runtime; this isn't supported by EF Core at the moment.
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.