Relation ManyToMany Betwen to Entity in Asp.Net Core Mvc 6

Mohamed Gader 0 Reputation points
2023-11-02T18:48:54.8633333+00:00

I have 2 Entity A and B .

evry Entity has a Key Id.

Class A has List<B> listB; and Class B has List<A> listA;

How i can do to create this relation and updat my database.

Thank you.

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
710 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,281 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,361 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,470 questions
{count} votes

1 answer

Sort by: Most helpful
  1. SurferOnWww 2,171 Reputation points
    2023-11-03T00:50:29.16+00:00

    Class A has List<B> listB; and Class B has List<A> listA;

    Such like the Instructor and Course classes or the Student and Course classes in the following diagram?

    diagram

    If so, the following Microsoft tutorial might be helpful:

    ASP.NET Core MVC with EF Core - tutorial series

    0 comments No comments